14 #ifndef mitkMAPRegistrationWrapper_h 15 #define mitkMAPRegistrationWrapper_h 22 #include <mapRegistrationBase.h> 23 #include <mapRegistration.h> 24 #include <mapExceptionObjectMacros.h> 25 #include <mapContinuousElements.h> 48 void SetRequestedRegionToLargestPossibleRegion()
override;
54 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
60 bool VerifyRequestedRegion()
override;
66 void SetRequestedRegion(
const itk::DataObject*)
override;
71 virtual unsigned int GetMovingDimensions()
const;
76 virtual unsigned int GetTargetDimensions()
const;
80 typedef ::map::core::RegistrationBase::TagType
TagType;
82 typedef ::map::core::RegistrationBase::TagMapType
TagMapType;
88 const TagMapType& GetTags()
const;
94 bool GetTagValue(
const TagType & tag, ValueType & value)
const;
104 bool HasLimitedTargetRepresentation()
const;
114 bool HasLimitedMovingRepresentation()
const;
125 template <
unsigned int VMovingDim,
unsigned int VTargetDim>
126 bool MapPoint(const ::itk::Point<mitk::ScalarType,VMovingDim>& inPoint, ::itk::Point<mitk::ScalarType,VTargetDim>& outPoint)
const 128 typedef typename ::map::core::continuous::Elements<VMovingDim>::PointType MAPMovingPointType;
129 typedef typename ::map::core::continuous::Elements<VTargetDim>::PointType MAPTargetPointType;
131 if (m_spRegistration.IsNull())
133 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Wrapper points to invalid registration (nullptr). Point: " << inPoint);
138 if ((this->GetMovingDimensions() == VMovingDim)&&(this->GetTargetDimensions() == VTargetDim))
140 MAPMovingPointType tempInP;
141 MAPTargetPointType tempOutP;
142 tempInP.CastFrom(inPoint);
144 typedef ::map::core::Registration<VMovingDim,VTargetDim> CastedRegType;
145 const CastedRegType* pCastedReg =
dynamic_cast<const CastedRegType*
>(m_spRegistration.GetPointer());
149 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Registration has invalid dimension. Point: " << inPoint);
152 result = pCastedReg->mapPoint(tempInP,tempOutP);
155 outPoint.CastFrom(tempOutP);
171 template <
unsigned int VMovingDim,
unsigned int VTargetDim>
172 bool MapPointInverse(const ::itk::Point<mitk::ScalarType,VTargetDim> & inPoint, ::itk::Point<mitk::ScalarType,VMovingDim> & outPoint)
const 174 typedef typename ::map::core::continuous::Elements<VMovingDim>::PointType MAPMovingPointType;
175 typedef typename ::map::core::continuous::Elements<VTargetDim>::PointType MAPTargetPointType;
177 if (m_spRegistration.IsNull())
179 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Wrapper points to invalid registration (nullptr). Point: " << inPoint);
184 if ((this->GetMovingDimensions() == VMovingDim)&&(this->GetTargetDimensions() == VTargetDim))
186 MAPTargetPointType tempInP;
187 MAPMovingPointType tempOutP;
188 tempInP.CastFrom(inPoint);
190 typedef ::map::core::Registration<VMovingDim,VTargetDim> CastedRegType;
191 const CastedRegType* pCastedReg =
dynamic_cast<const CastedRegType*
>(m_spRegistration.GetPointer());
195 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Registration has invalid dimension. Point: " << inPoint);
198 result = pCastedReg->mapPointInverse(tempInP,tempOutP);
201 outPoint.CastFrom(tempOutP);
236 void PrecomputeDirectMapping();
243 void PrecomputeInverseMapping();
245 ::map::core::RegistrationBase* GetRegistration();
246 const ::map::core::RegistrationBase* GetRegistration()
const;
248 void SetRegistration(::map::core::RegistrationBase* pReg);
251 void PrintSelf (std::ostream &os, itk::Indent indent)
const override;
Standard implementation of BaseGeometry.
::map::core::RegistrationBase::ValueType ValueType
Base of all data objects.
DataCollection - Class to facilitate loading/accessing structured data.
MAPRegistrationWrapper Wrapper class to allow the handling of MatchPoint registration objects as mitk...
::map::core::RegistrationBase::TagType TagType
bool MapPoint(const ::itk::Point< mitk::ScalarType, VMovingDim > &inPoint, ::itk::Point< mitk::ScalarType, VTargetDim > &outPoint) const
#define MITKMATCHPOINTREGISTRATION_EXPORT
ValueType
Type of the value held by a Value object.
#define mitkClassMacro(className, SuperClassName)
::map::core::RegistrationBase::Pointer m_spRegistration
::map::core::RegistrationBase::TagMapType TagMapType
bool MapPointInverse(const ::itk::Point< mitk::ScalarType, VTargetDim > &inPoint, ::itk::Point< mitk::ScalarType, VMovingDim > &outPoint) const