Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitk::MaskUtilities< TPixel, VImageDimension > Class Template Reference

Utility class for mask operations. It checks whether an image and a mask are compatible (spacing, orientation, etc...) and it can also crop an image to the LargestPossibleRegion of the Mask. More...

#include <mitkMaskUtilities.h>

Inheritance diagram for mitk::MaskUtilities< TPixel, VImageDimension >:
Collaboration diagram for mitk::MaskUtilities< TPixel, VImageDimension >:

Public Types

typedef MaskUtilities Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Image< TPixel, VImageDimension > ImageType
 
typedef itk::Image< unsigned short, VImageDimension > MaskType
 

Public Member Functions

virtual const char * GetClassName () const
 
void SetImage (ImageType *image)
 Set image. More...
 
void SetMask (MaskType *mask)
 Set mask. More...
 
bool CheckMaskSanity ()
 Checks whether mask and image are compatible for joint access (as via iterators). Spacing and direction must be the same between the two and they must be aligned. Also, the mask must be completely inside the image. More...
 
itk::Image< TPixel, VImageDimension >::Pointer ExtractMaskImageRegion ()
 Crops the image to the LargestPossibleRegion of the mask. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 MaskUtilities ()
 
 ~MaskUtilities () override
 

Detailed Description

template<class TPixel, unsigned int VImageDimension>
class mitk::MaskUtilities< TPixel, VImageDimension >

Utility class for mask operations. It checks whether an image and a mask are compatible (spacing, orientation, etc...) and it can also crop an image to the LargestPossibleRegion of the Mask.

Definition at line 27 of file mitkMaskUtilities.h.

Member Typedef Documentation

◆ ConstPointer

template<class TPixel, unsigned int VImageDimension>
typedef itk::SmartPointer< const Self > mitk::MaskUtilities< TPixel, VImageDimension >::ConstPointer

Definition at line 34 of file mitkMaskUtilities.h.

◆ ImageType

template<class TPixel, unsigned int VImageDimension>
typedef itk::Image<TPixel, VImageDimension> mitk::MaskUtilities< TPixel, VImageDimension >::ImageType

Definition at line 38 of file mitkMaskUtilities.h.

◆ MaskType

template<class TPixel, unsigned int VImageDimension>
typedef itk::Image<unsigned short, VImageDimension> mitk::MaskUtilities< TPixel, VImageDimension >::MaskType

Definition at line 41 of file mitkMaskUtilities.h.

◆ Pointer

template<class TPixel, unsigned int VImageDimension>
typedef itk::SmartPointer< Self > mitk::MaskUtilities< TPixel, VImageDimension >::Pointer

Definition at line 33 of file mitkMaskUtilities.h.

◆ Self

template<class TPixel, unsigned int VImageDimension>
typedef MaskUtilities mitk::MaskUtilities< TPixel, VImageDimension >::Self

Standard Self typedef

Definition at line 31 of file mitkMaskUtilities.h.

◆ Superclass

template<class TPixel, unsigned int VImageDimension>
typedef itk::Object mitk::MaskUtilities< TPixel, VImageDimension >::Superclass

Definition at line 32 of file mitkMaskUtilities.h.

Constructor & Destructor Documentation

◆ MaskUtilities()

template<class TPixel, unsigned int VImageDimension>
mitk::MaskUtilities< TPixel, VImageDimension >::MaskUtilities ( )
inlineprotected

Definition at line 65 of file mitkMaskUtilities.h.

◆ ~MaskUtilities()

template<class TPixel, unsigned int VImageDimension>
mitk::MaskUtilities< TPixel, VImageDimension >::~MaskUtilities ( )
inlineoverrideprotected

Definition at line 67 of file mitkMaskUtilities.h.

Member Function Documentation

◆ CheckMaskSanity()

template<class TPixel , unsigned int VImageDimension>
bool mitk::MaskUtilities< TPixel, VImageDimension >::CheckMaskSanity ( )

Checks whether mask and image are compatible for joint access (as via iterators). Spacing and direction must be the same between the two and they must be aligned. Also, the mask must be completely inside the image.

Definition at line 44 of file mitkMaskUtilities.cpp.

References mitk::eps, MITK_ERROR, and MITK_INFO.

◆ ExtractMaskImageRegion()

template<class TPixel , unsigned int VImageDimension>
itk::Image< TPixel, VImageDimension >::Pointer mitk::MaskUtilities< TPixel, VImageDimension >::ExtractMaskImageRegion ( )

Crops the image to the LargestPossibleRegion of the mask.

Definition at line 130 of file mitkMaskUtilities.cpp.

References MITK_ERROR.

◆ GetClassName()

template<class TPixel, unsigned int VImageDimension>
virtual const char* mitk::MaskUtilities< TPixel, VImageDimension >::GetClassName ( ) const
virtual

Runtime information support.

◆ New()

template<class TPixel, unsigned int VImageDimension>
static Pointer mitk::MaskUtilities< TPixel, VImageDimension >::New ( )
static

Method for creation through the object factory.

Referenced by mitk::ImageStatisticsCalculator::GetStatistics().

◆ SetImage()

template<class TPixel , unsigned int VImageDimension>
void mitk::MaskUtilities< TPixel, VImageDimension >::SetImage ( ImageType image)

Set image.

Definition at line 26 of file mitkMaskUtilities.cpp.

References image.

◆ SetMask()

template<class TPixel , unsigned int VImageDimension>
void mitk::MaskUtilities< TPixel, VImageDimension >::SetMask ( MaskType mask)

Set mask.

Definition at line 35 of file mitkMaskUtilities.cpp.

References mask.


The documentation for this class was generated from the following files: