Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkMaskAndCutRoiImageFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef mitkMaskAndCutRoiImageFilter_h
13 #define mitkMaskAndCutRoiImageFilter_h
14 
16 #include <mitkImageToImageFilter.h>
17 
18 #include <itkRegionOfInterestImageFilter.h>
20 #include <mitkBoundingObject.h>
21 #include <mitkDataNode.h>
22 #include <mitkMaskImageFilter.h>
23 
24 namespace mitk
25 {
44  {
45  typedef itk::Image<short, 3> ItkImageType;
46  typedef itk::Image<unsigned char, 3> ItkMaskType;
47  typedef itk::ImageRegion<3> RegionType;
48  typedef itk::RegionOfInterestImageFilter<ItkImageType, ItkImageType> ROIFilterType;
49 
50  public:
52  itkFactorylessNewMacro(Self);
53  itkCloneMacro(Self);
54 
65 
70  mitk::Image::Pointer GetOutput();
71 
72  protected:
75 
76  void GenerateData() override;
77 
78  ROIFilterType::Pointer m_RoiFilter;
79  mitk::AutoCropImageFilter::Pointer m_CropFilter;
80  mitk::MaskImageFilter::Pointer m_MaskFilter;
81 
82  // needed for temporary fix
83  mitk::Image::Pointer m_outputImage;
84 
85  }; // class
86 
87 } // namespace
88 
89 #endif
#define MITKALGORITHMSEXT_EXPORT
Base class of all data objects.
Definition: mitkBaseData.h:60
Superclass of all classes having one or more Images as input and generating Images as output.
Cuts and masks a region of interest (ROI) out of an image.
mitk::MaskImageFilter::Pointer m_MaskFilter
mitk::AutoCropImageFilter::Pointer m_CropFilter
mitkClassMacro(MaskAndCutRoiImageFilter, ImageToImageFilter)
mitk::Image::Pointer GetOutput()
Get the output image.
void SetRegionOfInterest(mitk::BaseData *roi)
Set the region of interest.
Find image slices visible on a given plane.