Helper class for bridging between MITK data objects and MatchPoint registration algorithms.
More...
#include <mitkMAPAlgorithmHelper.h>
|
| static bool | HasImageAlgorithmInterface (const map::algorithm::RegistrationAlgorithmBase *algorithm) |
| | Checks whether the given algorithm supports image-based registration. More...
|
| |
| static bool | HasPointSetAlgorithmInterface (const map::algorithm::RegistrationAlgorithmBase *algorithm) |
| | Checks whether the given algorithm supports point-set-based registration. More...
|
| |
Helper class for bridging between MITK data objects and MatchPoint registration algorithms.
MAPAlgorithmHelper simplifies setting MITK images or point sets as input data for MatchPoint registration algorithms. It handles data type checking, optional pixel type casting, and extraction of registration results.
- Note
- Current implementation is not thread-safe. Use one helper instance per registration task.
- See also
- mitk::MAPRegistrationWrapper, mitk::MaskedAlgorithmHelper
Definition at line 43 of file mitkMAPAlgorithmHelper.h.
◆ MAPAlgorithmHelper()
| mitk::MAPAlgorithmHelper::MAPAlgorithmHelper |
( |
map::algorithm::RegistrationAlgorithmBase * |
algorithm | ) |
|
Constructs a helper for the given registration algorithm.
- Parameters
-
| [in] | algorithm | Pointer to the MatchPoint registration algorithm to assist. |
◆ ~MAPAlgorithmHelper()
| mitk::MAPAlgorithmHelper::~MAPAlgorithmHelper |
( |
| ) |
|
|
inline |
◆ CheckData()
Checks whether the given moving and target data are compatible with the algorithm.
- Parameters
-
| [in] | moving | Pointer to the moving data. |
| [in] | target | Pointer to the target data. |
| [out] | error | The specific error type if the data is incompatible. |
- Returns
- True if the data can be used with the algorithm (considering the AllowImageCasting setting).
- Precondition
- The algorithm,
moving, and target must be valid pointers.
◆ GetAllowImageCasting()
| bool mitk::MAPAlgorithmHelper::GetAllowImageCasting |
( |
| ) |
const |
Returns whether automatic pixel type casting is currently allowed.
- Returns
- True if casting is allowed, false otherwise.
◆ GetMITKRegistrationWrapper()
| mitk::MAPRegistrationWrapper::Pointer mitk::MAPAlgorithmHelper::GetMITKRegistrationWrapper |
( |
| ) |
const |
Retrieves the registration result wrapped in a MITK-compatible wrapper.
- Returns
- Smart pointer to a MAPRegistrationWrapper containing the algorithm's registration.
- See also
- GetRegistration
◆ GetRegistration()
| map::core::RegistrationBase::Pointer mitk::MAPAlgorithmHelper::GetRegistration |
( |
| ) |
const |
Retrieves the registration result from the algorithm.
- Returns
- Smart pointer to the computed MatchPoint registration, or nullptr if unavailable.
- Exceptions
-
| map::core::ExceptionObject | if the algorithm has unsupported dimensionality. |
◆ HasImageAlgorithmInterface()
| static bool mitk::MAPAlgorithmHelper::HasImageAlgorithmInterface |
( |
const map::algorithm::RegistrationAlgorithmBase * |
algorithm | ) |
|
|
static |
Checks whether the given algorithm supports image-based registration.
- Parameters
-
| [in] | algorithm | Pointer to the algorithm to check. |
- Returns
- True if the algorithm implements the ImageRegistrationAlgorithmInterface.
◆ HasPointSetAlgorithmInterface()
| static bool mitk::MAPAlgorithmHelper::HasPointSetAlgorithmInterface |
( |
const map::algorithm::RegistrationAlgorithmBase * |
algorithm | ) |
|
|
static |
Checks whether the given algorithm supports point-set-based registration.
- Parameters
-
| [in] | algorithm | Pointer to the algorithm to check. |
- Returns
- True if the algorithm implements the PointSetRegistrationAlgorithmInterface.
◆ SetAllowImageCasting()
| void mitk::MAPAlgorithmHelper::SetAllowImageCasting |
( |
bool |
allowCasting | ) |
|
Enables or disables automatic pixel type casting for images.
When enabled, images whose pixel types differ from the algorithm's expected type will be automatically cast to the default internal pixel type.
- Parameters
-
| [in] | allowCasting | True to allow casting, false to disallow. |
◆ SetData()
Sets moving and target data on the algorithm.
The data can be either images or point sets. If images require pixel type casting and casting is allowed, they will be cast to the algorithm's default internal type.
- Parameters
-
- Precondition
- The algorithm must be set.
-
moving and target must be valid pointers.
- Exceptions
-
| map::core::ExceptionObject | if the data cannot be set on the algorithm. |
The documentation for this class was generated from the following file: