Medical Imaging Interaction Toolkit  2023.12.00
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)

◆ ~MaskedAlgorithmHelper()

mitk::MaskedAlgorithmHelper::~MaskedAlgorithmHelper ( )
inline

Definition at line 54 of file mitkMaskedAlgorithmHelper.h.

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.

◆ HasMaskedRegistrationAlgorithmInterface()

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

◆ 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.

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