Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 {
36  {
37  typedef itk::Image<short, 3> ItkImageType;
38  typedef itk::Image<unsigned char, 3> ItkMaskType;
39  typedef itk::ImageRegion<3> RegionType;
40  typedef itk::RegionOfInterestImageFilter<ItkImageType, ItkImageType> ROIFilterType;
41 
42  public:
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46  itkGetMacro(MaxValue, mitk::ScalarType);
47  itkGetMacro(MinValue, mitk::ScalarType);
48 
49  void SetRegionOfInterest(mitk::BaseData *roi);
50  // void SetRegionOfInterest(Image::Pointer image);
51  // void SetRegionOfInterest(BoundingObject::Pointer boundingObject);
52  // void SetRegionOfInterestByNode(mitk::DataNode::Pointer node);
53 
54  // temporary fix for bug #
55  mitk::Image::Pointer GetOutput();
56 
57  protected:
59  ~MaskAndCutRoiImageFilter() override;
60 
61  void GenerateData() override;
62 
63  ROIFilterType::Pointer m_RoiFilter;
66 
67  // needed for temporary fix
69 
72 
73  }; // class
74 
75 } // namespace
76 
77 #endif
mitk::AutoCropImageFilter::Pointer m_CropFilter
Base of all data objects.
Definition: mitkBaseData.h:37
double ScalarType
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
mitk::MaskImageFilter::Pointer m_MaskFilter
Superclass of all classes having one or more Images as input and generating Images as output...
Cuts a region of interest (ROI) out of an image.