Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::MaskedAlgorithmHelper Class Reference

MaskedAlgorithmHelper Helper class as an easy bridge to set mitk images as masks for registration algorithms. It is assumed that the Image indicates the mask by pixel values != 0. More...

#include <mitkMaskedAlgorithmHelper.h>

Public Member Functions

 MaskedAlgorithmHelper (map::algorithm::RegistrationAlgorithmBase *algorithm=NULL)
 
bool SetMasks (const mitk::Image *movingMask, const mitk::Image *targetMask)
 
bool CheckSupport (const mitk::Image *movingMask, const mitk::Image *targetMask) const
 
 ~MaskedAlgorithmHelper ()
 

Detailed Description

MaskedAlgorithmHelper Helper class as an easy bridge to set mitk images as masks for registration algorithms. It is assumed that the Image indicates the mask by pixel values != 0.

Remarks
Currently only 2D-2D and 3D-3D algorithms are supported.
Currently only masks with pixel type unsigned char (default mitk segmentation images) are supported.
Current implementation is not thread-save. Just use one Helper class per registration task.

Definition at line 41 of file mitkMaskedAlgorithmHelper.h.

Constructor & Destructor Documentation

mitk::MaskedAlgorithmHelper::MaskedAlgorithmHelper ( map::algorithm::RegistrationAlgorithmBase *  algorithm = NULL)

Definition at line 31 of file mitkMaskedAlgorithmHelper.cpp.

mitk::MaskedAlgorithmHelper::~MaskedAlgorithmHelper ( )
inline

Definition at line 56 of file mitkMaskedAlgorithmHelper.h.

Member Function Documentation

bool mitk::MaskedAlgorithmHelper::CheckSupport ( const mitk::Image movingMask,
const mitk::Image targetMask 
) const

Checks if the algorithm supports masks of the passed type.

Definition at line 37 of file mitkMaskedAlgorithmHelper.cpp.

References mitk::Image::GetDimension(), and mitk::Image::GetPixelType().

Referenced by SetMasks().

bool mitk::MaskedAlgorithmHelper::SetMasks ( const mitk::Image movingMask,
const mitk::Image targetMask 
)

Set one or both masks to an algorithm. If the algorithm does not support masks it will be ignored.

Remarks
Set a mask to NULL if you don't want to set it.
Returns
Indicates if the masks could be set/was supported by algorithm.

Definition at line 108 of file mitkMaskedAlgorithmHelper.cpp.

References CheckSupport().

Referenced by mitk::TimeFramesRegistrationHelper::DoFrameRegistration(), and QmitkRegistrationJob::run().


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