Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkMaskUtilities.h
Go to the documentation of this file.
1 #ifndef MITKMASKUTIL
2 #define MITKMASKUTIL
3 
5 #include <mitkImage.h>
6 #include <itkImage.h>
7 
8 namespace mitk
9 {
14 template <class TPixel, unsigned int VImageDimension>
15 class MITKIMAGESTATISTICS_EXPORT MaskUtilities: public itk::Object
16  {
17  public:
20  typedef itk::Object Superclass;
23 
25  itkNewMacro(Self)
26 
27 
28  itkTypeMacro(MaskUtilities, itk::Object)
29 
30  typedef itk::Image<TPixel, VImageDimension> ImageType;
31  typedef itk::Image<unsigned short, VImageDimension> MaskType;
32 
36  void SetImage(ImageType* image);
37 
41  void SetMask(MaskType* mask);
42 
47  bool CheckMaskSanity();
48 
52  typename itk::Image<TPixel, VImageDimension>::Pointer ExtractMaskImageRegion();
53 
54  protected:
55  MaskUtilities(){}
56 
58 
59  private:
60  itk::Image<TPixel, VImageDimension>* m_Image;
61  itk::Image<unsigned short, VImageDimension>* m_Mask;
62  };
63 }
64 
65 #ifndef ITK_MANUAL_INSTANTIATION
66 #include <mitkMaskUtilities.cpp>
67 #endif
68 
69 #endif
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
DataCollection - Class to facilitate loading/accessing structured data.
Utility class for mask operations. It checks whether an image and a mask are compatible (spacing...
#define MITKIMAGESTATISTICS_EXPORT
Image class for storing images.
Definition: mitkImage.h:76
itk::Image< unsigned short, VImageDimension > MaskType
itk::Image< TPixel, VImageDimension > ImageType