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

Wrapper class that adapts MatchPoint registration objects to the MITK data model. More...

#include <mitkMAPRegistrationWrapper.h>

Inheritance diagram for mitk::MAPRegistrationWrapper:
Collaboration diagram for mitk::MAPRegistrationWrapper:

Public Types

typedef ::map::core::RegistrationBase::TagType TagType
 Tag key type from the MatchPoint registration metadata. More...
 
typedef ::map::core::RegistrationBase::ValueType ValueType
 Tag value type from the MatchPoint registration metadata. More...
 
typedef ::map::core::RegistrationBase::TagMapType TagMapType
 Map type associating tag keys with their values. More...
 
- Public Types inherited from mitk::Identifiable
using UIDType = std::string
 Type alias for unique identifiers. More...
 

Public Member Functions

 mitkClassMacro (MAPRegistrationWrapper, BaseData)
 
 mitkNewMacro1Param (Self, ::map::core::RegistrationBase *)
 
Identifiable::UIDType GetUID () const override
 Returns the unique identifier of the wrapped registration. More...
 
bool IsEmptyTimeStep (unsigned int t) const override
 Checks whether the registration is empty at the given time step. More...
 
bool IsEmpty () const override
 Checks whether the registration wrapper contains no valid registration. More...
 
void SetRequestedRegionToLargestPossibleRegion () override
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
bool VerifyRequestedRegion () override
 
void SetRequestedRegion (const itk::DataObject *) override
 
virtual unsigned int GetMovingDimensions () const
 Gets the number of dimensions of the moving space. More...
 
virtual unsigned int GetTargetDimensions () const
 Gets the number of dimensions of the target space. More...
 
const TagMapType & GetTags () const
 Returns all metadata tags associated with this registration. More...
 
bool GetTagValue (const TagType &tag, ValueType &value) const
 Retrieves the value for a specific metadata tag. More...
 
bool HasLimitedTargetRepresentation () const
 Checks whether the inverse mapping kernel has a limited representation in target space. More...
 
bool HasLimitedMovingRepresentation () const
 Checks whether the direct mapping kernel has a limited representation in moving space. More...
 
template<unsigned int VMovingDim, unsigned int VTargetDim>
bool MapPoint (const ::itk::Point< mitk::ScalarType, VMovingDim > &inPoint, ::itk::Point< mitk::ScalarType, VTargetDim > &outPoint) const
 Maps a point from moving space to target space using the direct mapping kernel. More...
 
template<unsigned int VMovingDim, unsigned int VTargetDim>
bool MapPointInverse (const ::itk::Point< mitk::ScalarType, VTargetDim > &inPoint, ::itk::Point< mitk::ScalarType, VMovingDim > &outPoint) const
 Maps a point from target space to moving space using the inverse mapping kernel. More...
 
mitk::Geometry3D GetDirectFieldRepresentation () const
 Returns the field representation of the direct mapping kernel as a Geometry3D. More...
 
mitk::Geometry3D GetInverseFieldRepresentation () const
 Returns the field representation of the inverse mapping kernel as a Geometry3D. More...
 
void PrecomputeDirectMapping ()
 Forces the direct mapping kernel to precompute its deformation field. More...
 
void PrecomputeInverseMapping ()
 Forces the inverse mapping kernel to precompute its deformation field. More...
 
::map::core::RegistrationBase * GetRegistration ()
 Returns a mutable pointer to the wrapped MatchPoint registration. More...
 
const ::map::core::RegistrationBase * GetRegistration () const
 Returns a const pointer to the wrapped MatchPoint registration. More...
 
- Public Member Functions inherited from mitk::BaseData
 mitkClassMacroItkParent (BaseData, itk::DataObject)
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
 Get a const property by its key. More...
 
std::vector< std::string > GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override
 Get all property keys stored in the property list. More...
 
std::vector< std::string > GetPropertyContextNames () const override
 Get the names of all property contexts. More...
 
BaseProperty * GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
 Get a non-const property by its key. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Set a property in the property list. More...
 
void RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Remove a property from the property list. More...
 
const mitk::TimeGeometry * GetTimeGeometry () const
 Return the TimeGeometry of the data as const pointer. More...
 
mitk::TimeGeometry * GetTimeGeometry ()
 Return the TimeGeometry of the data as non-const pointer. More...
 
const mitk::TimeGeometry * GetUpdatedTimeGeometry ()
 Return the TimeGeometry of the data after ensuring it is up-to-date. More...
 
virtual void Expand (unsigned int timeSteps)
 Expand the TimeGeometry to a number of time steps. More...
 
const mitk::BaseGeometry * GetUpdatedGeometry (int t=0)
 Return the BaseGeometry of the data at time step t after ensuring it is up-to-date. More...
 
mitk::BaseGeometry * GetGeometry (int t=0) const
 Return the BaseGeometry of the data at time step t as a non-const pointer. More...
 
void UpdateOutputInformation () override
 Update the information for this BaseData so that it can be used as an output of a BaseProcess. More...
 
void CopyInformation (const itk::DataObject *data) override
 Copy information from the specified data set. More...
 
virtual bool IsInitialized () const
 Check whether the data has been initialized. More...
 
virtual void Clear ()
 Reset the data object by calling ClearData() and InitializeEmpty(). More...
 
void ExecuteOperation (Operation *operation) override
 Execute an operation on this data object. More...
 
virtual void SetGeometry (BaseGeometry *aGeometry3D)
 Set the BaseGeometry of the data, which will be referenced (not copied!). More...
 
virtual void SetTimeGeometry (TimeGeometry *geometry)
 Set the TimeGeometry of the data, which will be referenced (not copied!). More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D)
 Set a clone of the provided geometry as the BaseGeometry of the data. More...
 
virtual void SetClonedTimeGeometry (const TimeGeometry *geometry)
 Set a clone of the provided TimeGeometry as the TimeGeometry of the data. More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time)
 Set a clone of the provided geometry as the BaseGeometry of a given time step. More...
 
mitk::PropertyList::Pointer GetPropertyList () const
 Get the data's property list. More...
 
void SetPropertyList (PropertyList *propertyList)
 Set the data's property list, replacing the existing one. More...
 
mitk::BaseProperty::Pointer GetProperty (const char *propertyKey) const
 Get a property by its key from the PropertyList. More...
 
void SetProperty (const char *propertyKey, BaseProperty *property)
 Set a property in the PropertyList. More...
 
virtual void SetOrigin (const Point3D &origin)
 Convenience method for setting the origin of the BaseGeometry instances of all time steps. More...
 
itk::SmartPointer< mitk::BaseDataSource > GetSource () const
 Get the process object that generated this data object. More...
 
unsigned int GetTimeSteps () const
 Get the number of time steps from the TimeGeometry. More...
 
itk::ModifiedTimeType GetMTime () const override
 Get the modification time of this data object or its geometry, whichever was modified most recently. More...
 
void Graft (const DataObject *) override
 Graft data and information from another data object. More...
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 
- Public Member Functions inherited from mitk::Identifiable
 Identifiable ()
 Default constructor. Generates a new random UID. More...
 
 Identifiable (const UIDType &uid)
 Construct with a pre-existing UID. More...
 
 Identifiable (const Identifiable &)=delete
 Copy construction is deleted to prevent UID duplication. More...
 
 Identifiable (Identifiable &&) noexcept
 Move constructor. Transfers ownership of the UID. More...
 
virtual ~Identifiable ()
 Virtual destructor. More...
 
Identifiable & operator= (const Identifiable &)=delete
 Copy assignment is deleted to prevent UID duplication. More...
 
Identifiable & operator= (Identifiable &&other) noexcept
 Move assignment operator. Transfers ownership of the UID. More...
 
UIDType GetRuntimeUID () const noexcept
 Get a runtime-unique ID for this object instance. More...
 
- Public Member Functions inherited from mitk::IPropertyOwner
 ~IPropertyOwner () override
 
virtual bool PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const
 Checks if a certain property exists. More...
 
- Public Member Functions inherited from mitk::IPropertyProvider
virtual ~IPropertyProvider ()
 Virtual destructor. More...
 

Protected Member Functions

void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 MAPRegistrationWrapper (::map::core::RegistrationBase *registration)
 
 ~MAPRegistrationWrapper () override
 
void SetUID (const UIDType &uid) override
 
- Protected Member Functions inherited from mitk::BaseData
 BaseData ()
 
 BaseData (const BaseData &other)
 
 ~BaseData () override
 
virtual void InitializeTimeGeometry (unsigned int timeSteps=1)
 Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More...
 
virtual void ClearData ()
 reset to non-initialized state, release memory More...
 
virtual void InitializeEmpty ()
 Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More...
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Protected Attributes

::map::core::RegistrationBase::Pointer m_spRegistration
 
- Protected Attributes inherited from mitk::BaseData
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
 
unsigned int m_SourceOutputIndexDuplicate
 
bool m_Initialized
 

Detailed Description

Wrapper class that adapts MatchPoint registration objects to the MITK data model.

MAPRegistrationWrapper wraps a map::core::RegistrationBase instance so that it can be handled as a mitk::BaseData object. This allows registrations to be stored in the MITK DataStorage, displayed in the Data Manager, and visualized via registration mappers.

The wrapper provides convenience methods for point mapping (direct and inverse), field representation queries, and kernel precomputation.

See also
mitk::MITKRegistrationHelper, mitk::ImageMappingHelper, mitk::MITKRegistrationWrapperMapperBase

Definition at line 44 of file mitkMAPRegistrationWrapper.h.

Member Typedef Documentation

◆ TagMapType

typedef ::map::core::RegistrationBase::TagMapType mitk::MAPRegistrationWrapper::TagMapType

Map type associating tag keys with their values.

Definition at line 114 of file mitkMAPRegistrationWrapper.h.

◆ TagType

typedef ::map::core::RegistrationBase::TagType mitk::MAPRegistrationWrapper::TagType

Tag key type from the MatchPoint registration metadata.

Definition at line 110 of file mitkMAPRegistrationWrapper.h.

◆ ValueType

typedef ::map::core::RegistrationBase::ValueType mitk::MAPRegistrationWrapper::ValueType

Tag value type from the MatchPoint registration metadata.

Definition at line 112 of file mitkMAPRegistrationWrapper.h.

Constructor & Destructor Documentation

◆ MAPRegistrationWrapper()

mitk::MAPRegistrationWrapper::MAPRegistrationWrapper ( ::map::core::RegistrationBase *  registration)
protected

◆ ~MAPRegistrationWrapper()

mitk::MAPRegistrationWrapper::~MAPRegistrationWrapper ( )
overrideprotected

Member Function Documentation

◆ GetDirectFieldRepresentation()

mitk::Geometry3D mitk::MAPRegistrationWrapper::GetDirectFieldRepresentation ( ) const

Returns the field representation of the direct mapping kernel as a Geometry3D.

The field representation defines the part of the moving space that is guaranteed to be mapped by the direct mapping kernel. This method converts the internal MatchPoint field representation descriptor into a mitk::Geometry3D.

Returns
A Geometry3D describing the supported registration space in the moving domain. Returns a default-constructed Geometry3D if the direct kernel is global (unlimited).
Precondition
A valid registration instance must be set.

◆ GetInverseFieldRepresentation()

mitk::Geometry3D mitk::MAPRegistrationWrapper::GetInverseFieldRepresentation ( ) const

Returns the field representation of the inverse mapping kernel as a Geometry3D.

The field representation defines the part of the target space that is guaranteed to be mapped by the inverse mapping kernel. This method converts the internal MatchPoint field representation descriptor into a mitk::Geometry3D.

Returns
A Geometry3D describing the supported registration space in the target domain. Returns a default-constructed Geometry3D if the inverse kernel is global (unlimited).
Precondition
A valid registration instance must be set.

◆ GetMovingDimensions()

virtual unsigned int mitk::MAPRegistrationWrapper::GetMovingDimensions ( ) const
virtual

Gets the number of dimensions of the moving space.

Returns
The moving dimensionality of the wrapped registration.
Precondition
A valid registration instance must be set.

◆ GetRegistration() [1/2]

::map::core::RegistrationBase* mitk::MAPRegistrationWrapper::GetRegistration ( )

Returns a mutable pointer to the wrapped MatchPoint registration.

Returns
Pointer to the internal RegistrationBase instance.

◆ GetRegistration() [2/2]

const ::map::core::RegistrationBase* mitk::MAPRegistrationWrapper::GetRegistration ( ) const

Returns a const pointer to the wrapped MatchPoint registration.

Returns
Const pointer to the internal RegistrationBase instance.

◆ GetTags()

const TagMapType& mitk::MAPRegistrationWrapper::GetTags ( ) const

Returns all metadata tags associated with this registration.

Returns
A const reference to the TagMapType containing all tags.
Precondition
A valid registration instance must be set.

◆ GetTagValue()

bool mitk::MAPRegistrationWrapper::GetTagValue ( const TagType &  tag,
ValueType &  value 
) const

Retrieves the value for a specific metadata tag.

Parameters
[in]tagThe tag key to look up.
[out]valueThe value associated with the tag, if found.
Returns
True if the tag was found and the value was set, false otherwise.
Precondition
A valid registration instance must be set.

◆ GetTargetDimensions()

virtual unsigned int mitk::MAPRegistrationWrapper::GetTargetDimensions ( ) const
virtual

Gets the number of dimensions of the target space.

Returns
The target dimensionality of the wrapped registration.
Precondition
A valid registration instance must be set.

◆ GetUID()

Identifiable::UIDType mitk::MAPRegistrationWrapper::GetUID ( ) const
overridevirtual

Returns the unique identifier of the wrapped registration.

Returns
The UID string of the registration instance.

Reimplemented from mitk::Identifiable.

◆ HasLimitedMovingRepresentation()

bool mitk::MAPRegistrationWrapper::HasLimitedMovingRepresentation ( ) const

Checks whether the direct mapping kernel has a limited representation in moving space.

Returns
True if the moving representation is limited (the direct kernel covers only a part of the moving space, so not all direct mapping operations are guaranteed to succeed). False if the representation is unlimited (all direct mappings are guaranteed to succeed).
Precondition
A valid registration instance must be set.

◆ HasLimitedTargetRepresentation()

bool mitk::MAPRegistrationWrapper::HasLimitedTargetRepresentation ( ) const

Checks whether the inverse mapping kernel has a limited representation in target space.

Returns
True if the target representation is limited (the inverse kernel covers only a part of the target space, so not all inverse mapping operations are guaranteed to succeed). False if the representation is unlimited (all inverse mappings are guaranteed to succeed).
Precondition
A valid registration instance must be set.

◆ IsEmpty()

bool mitk::MAPRegistrationWrapper::IsEmpty ( ) const
overridevirtual

Checks whether the registration wrapper contains no valid registration.

Returns
True if no registration is set.

Reimplemented from mitk::BaseData.

◆ IsEmptyTimeStep()

bool mitk::MAPRegistrationWrapper::IsEmptyTimeStep ( unsigned int  t) const
overridevirtual

Checks whether the registration is empty at the given time step.

Parameters
[in]tThe time step to check.
Returns
True if no registration is set (m_spRegistration is null).

Reimplemented from mitk::BaseData.

◆ MapPoint()

template<unsigned int VMovingDim, unsigned int VTargetDim>
bool mitk::MAPRegistrationWrapper::MapPoint ( const ::itk::Point< mitk::ScalarType, VMovingDim > &  inPoint,
::itk::Point< mitk::ScalarType, VTargetDim > &  outPoint 
) const
inline

Maps a point from moving space to target space using the direct mapping kernel.

Template Parameters
VMovingDimDimensionality of the moving space point.
VTargetDimDimensionality of the target space point.
Parameters
[in]inPointThe point in moving space to map.
[out]outPointThe mapped point in target space (only valid if return is true).
Returns
True if the mapping was successful, false otherwise (e.g. dimension mismatch).
Precondition
A valid registration instance must be set.
The direct mapping kernel must be defined.
Note
The operation may fail if the registration dimensions do not match the point dimensions.
Exceptions
mapDefaultExceptionif the registration pointer is null or has invalid dimensions.

Definition at line 166 of file mitkMAPRegistrationWrapper.h.

◆ MapPointInverse()

template<unsigned int VMovingDim, unsigned int VTargetDim>
bool mitk::MAPRegistrationWrapper::MapPointInverse ( const ::itk::Point< mitk::ScalarType, VTargetDim > &  inPoint,
::itk::Point< mitk::ScalarType, VMovingDim > &  outPoint 
) const
inline

Maps a point from target space to moving space using the inverse mapping kernel.

Template Parameters
VMovingDimDimensionality of the moving space point.
VTargetDimDimensionality of the target space point.
Parameters
[in]inPointThe point in target space to map.
[out]outPointThe mapped point in moving space (only valid if return is true).
Returns
True if the mapping was successful, false otherwise (e.g. dimension mismatch).
Precondition
A valid registration instance must be set.
Note
The operation may fail if the registration dimensions do not match the point dimensions.
Exceptions
mapDefaultExceptionif the registration pointer is null or has invalid dimensions.

Definition at line 216 of file mitkMAPRegistrationWrapper.h.

◆ mitkClassMacro()

mitk::MAPRegistrationWrapper::mitkClassMacro ( MAPRegistrationWrapper  ,
BaseData   
)

◆ mitkNewMacro1Param()

mitk::MAPRegistrationWrapper::mitkNewMacro1Param ( Self  ,
::map::core::RegistrationBase *   
)

◆ PrecomputeDirectMapping()

void mitk::MAPRegistrationWrapper::PrecomputeDirectMapping ( )

Forces the direct mapping kernel to precompute its deformation field.

This is useful for lazy field-based kernels that defer computation until first use. Calling this method ensures the field is computed immediately.

Precondition
A valid registration instance must be set.

◆ PrecomputeInverseMapping()

void mitk::MAPRegistrationWrapper::PrecomputeInverseMapping ( )

Forces the inverse mapping kernel to precompute its deformation field.

This is useful for lazy field-based kernels that defer computation until first use. Calling this method ensures the field is computed immediately.

Precondition
A valid registration instance must be set.

◆ PrintSelf()

void mitk::MAPRegistrationWrapper::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

◆ RequestedRegionIsOutsideOfTheBufferedRegion()

bool mitk::MAPRegistrationWrapper::RequestedRegionIsOutsideOfTheBufferedRegion ( )
overridevirtual

Empty implementation, since the MAPRegistrationWrapper doesn't support the requested region concept

Implements mitk::BaseData.

◆ SetRequestedRegion()

void mitk::MAPRegistrationWrapper::SetRequestedRegion ( const itk::DataObject *  )
overridevirtual

Empty implementation, since the MAPRegistrationWrapper doesn't support the requested region concept

Implements mitk::BaseData.

◆ SetRequestedRegionToLargestPossibleRegion()

void mitk::MAPRegistrationWrapper::SetRequestedRegionToLargestPossibleRegion ( )
overridevirtual

Empty implementation, since the MAPRegistrationWrapper doesn't support the requested region concept

Implements mitk::BaseData.

◆ SetUID()

void mitk::MAPRegistrationWrapper::SetUID ( const UIDType &  uid)
overrideprotectedvirtual

Reimplemented from mitk::Identifiable.

◆ VerifyRequestedRegion()

bool mitk::MAPRegistrationWrapper::VerifyRequestedRegion ( )
overridevirtual

Empty implementation, since the MAPRegistrationWrapper doesn't support the requested region concept

Implements mitk::BaseData.

Member Data Documentation

◆ m_spRegistration

::map::core::RegistrationBase::Pointer mitk::MAPRegistrationWrapper::m_spRegistration
protected

Definition at line 319 of file mitkMAPRegistrationWrapper.h.


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