Medical Imaging Interaction Toolkit  2018.4.99-b585543d
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)
 
bool SetMasks (const mitk::Image *movingMask, const mitk::Image *targetMask)
 
bool CheckSupport (const mitk::Image *movingMask, const mitk::Image *targetMask) const
 
 ~MaskedAlgorithmHelper ()
 

Static Public Member Functions

static bool HasMaskedRegistrationAlgorithmInterface (const map::algorithm::RegistrationAlgorithmBase *algorithm)
 

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.
Current implementation is not thread-save. Just use one Helper class per registration task.

Definition at line 37 of file mitkMaskedAlgorithmHelper.h.

Constructor & Destructor Documentation

◆ MaskedAlgorithmHelper()

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

Definition at line 27 of file mitkMaskedAlgorithmHelper.cpp.

◆ ~MaskedAlgorithmHelper()

mitk::MaskedAlgorithmHelper::~MaskedAlgorithmHelper ( )
inline

Definition at line 54 of file mitkMaskedAlgorithmHelper.h.

References mask.

Member Function Documentation

◆ CheckSupport()

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 41 of file mitkMaskedAlgorithmHelper.cpp.

References mitk::Image::GetDimension().

Referenced by HasMaskedRegistrationAlgorithmInterface(), and SetMasks().

◆ HasMaskedRegistrationAlgorithmInterface()

bool mitk::MaskedAlgorithmHelper::HasMaskedRegistrationAlgorithmInterface ( const map::algorithm::RegistrationAlgorithmBase *  algorithm)
static

Definition at line 31 of file mitkMaskedAlgorithmHelper.cpp.

References CheckSupport().

◆ 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 nullptr if you don't want to set it.
Returns
Indicates if the masks could be set/was supported by algorithm.

Definition at line 82 of file mitkMaskedAlgorithmHelper.cpp.

References AccessFixedDimensionByItk, CheckSupport(), and mask.

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


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