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

Helper class for setting MITK images as masks on MatchPoint registration algorithms. More...

#include <mitkMaskedAlgorithmHelper.h>

Public Member Functions

 MaskedAlgorithmHelper (map::algorithm::RegistrationAlgorithmBase *algorithm)
 Constructs a helper for the given registration algorithm. More...
 
bool SetMasks (const mitk::Image *movingMask, const mitk::Image *targetMask)
 Sets one or both masks on the algorithm. More...
 
bool CheckSupport (const mitk::Image *movingMask, const mitk::Image *targetMask) const
 Checks whether the algorithm supports masks of the given types. More...
 
 ~MaskedAlgorithmHelper ()
 

Static Public Member Functions

static bool HasMaskedRegistrationAlgorithmInterface (const map::algorithm::RegistrationAlgorithmBase *algorithm)
 Checks whether the given algorithm implements the MaskedRegistrationAlgorithm interface. More...
 

Detailed Description

Helper class for setting MITK images as masks on MatchPoint registration algorithms.

MaskedAlgorithmHelper bridges MITK mask images to the MatchPoint MaskedRegistrationAlgorithm interface. Mask pixels with values != 0 are treated as inside the mask region.

Note
Currently only 2D-2D and 3D-3D algorithms are supported.
Current implementation is not thread-safe. Use one helper instance per registration task.
See also
mitk::MAPAlgorithmHelper

Definition at line 41 of file mitkMaskedAlgorithmHelper.h.

Constructor & Destructor Documentation

◆ MaskedAlgorithmHelper()

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

Constructs a helper for the given registration algorithm.

Parameters
[in]algorithmPointer to the MatchPoint registration algorithm that should receive masks.

◆ ~MaskedAlgorithmHelper()

mitk::MaskedAlgorithmHelper::~MaskedAlgorithmHelper ( )
inline

Definition at line 79 of file mitkMaskedAlgorithmHelper.h.

Member Function Documentation

◆ CheckSupport()

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

Checks whether the algorithm supports masks of the given types.

Parameters
[in]movingMaskPointer to the moving mask image to check compatibility for.
[in]targetMaskPointer to the target mask image to check compatibility for.
Returns
True if the algorithm supports the given mask types, false otherwise.

◆ HasMaskedRegistrationAlgorithmInterface()

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

Checks whether the given algorithm implements the MaskedRegistrationAlgorithm interface.

Parameters
[in]algorithmPointer to the algorithm to check.
Returns
True if the algorithm supports masks, false otherwise.

◆ SetMasks()

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

Sets one or both masks on the algorithm.

If the algorithm does not support the masked registration interface, the masks are ignored. The mask images are converted to spatial objects internally.

Parameters
[in]movingMaskPointer to the mask image for the moving data, or nullptr to skip.
[in]targetMaskPointer to the mask image for the target data, or nullptr to skip.
Returns
True if the masks were successfully set (algorithm supports masks), false otherwise.

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