18 #ifndef mitkMAPRegistrationWrapper_h
19 #define mitkMAPRegistrationWrapper_h
26 #include <mapRegistrationBase.h>
27 #include <mapRegistration.h>
28 #include <mapExceptionObjectMacros.h>
29 #include <mapContinuousElements.h>
52 virtual void SetRequestedRegionToLargestPossibleRegion();
58 virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
64 virtual bool VerifyRequestedRegion();
70 virtual void SetRequestedRegion(
const itk::DataObject*);
75 virtual unsigned int GetMovingDimensions()
const;
80 virtual unsigned int GetTargetDimensions()
const;
84 typedef ::map::core::RegistrationBase::TagType
TagType;
86 typedef ::map::core::RegistrationBase::TagMapType
TagMapType;
92 const TagMapType& GetTags()
const;
98 bool GetTagValue(
const TagType & tag, ValueType & value)
const;
108 bool HasLimitedTargetRepresentation()
const;
118 bool HasLimitedMovingRepresentation()
const;
129 template <
unsigned int VMovingDim,
unsigned int VTargetDim>
130 bool MapPoint(const ::itk::Point<mitk::ScalarType,VMovingDim>& inPoint, ::itk::Point<mitk::ScalarType,VTargetDim>& outPoint)
const
132 typedef ::itk::Point<mitk::ScalarType,VMovingDim> MITKMovingPointType;
133 typedef ::itk::Point<mitk::ScalarType,VTargetDim> MITKTargetPointType;
137 if (m_spRegistration.IsNull())
139 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Wrapper points to invalid registration (NULL). Point: " << inPoint);
144 if ((this->GetMovingDimensions() == VMovingDim)&&(this->GetTargetDimensions() == VTargetDim))
146 MAPMovingPointType tempInP;
147 MAPTargetPointType tempOutP;
148 tempInP.CastFrom(inPoint);
150 typedef map::core::Registration<VMovingDim,VTargetDim> CastedRegType;
151 const CastedRegType* pCastedReg =
dynamic_cast<const CastedRegType*
>(m_spRegistration.GetPointer());
155 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Registration has invalid dimension. Point: " << inPoint);
158 result = pCastedReg->mapPoint(tempInP,tempOutP);
161 outPoint.CastFrom(tempOutP);
177 template <
unsigned int VMovingDim,
unsigned int VTargetDim>
178 bool MapPointInverse(const ::itk::Point<mitk::ScalarType,VTargetDim> & inPoint, ::itk::Point<mitk::ScalarType,VMovingDim> & outPoint)
const
180 typedef ::itk::Point<mitk::ScalarType,VMovingDim> MITKMovingPointType;
181 typedef ::itk::Point<mitk::ScalarType,VTargetDim> MITKTargetPointType;
185 if (m_spRegistration.IsNull())
187 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Wrapper points to invalid registration (NULL). Point: " << inPoint);
192 if ((this->GetMovingDimensions() == VMovingDim)&&(this->GetTargetDimensions() == VTargetDim))
194 MAPTargetPointType tempInP;
195 MAPMovingPointType tempOutP;
196 tempInP.CastFrom(inPoint);
198 typedef map::core::Registration<VMovingDim,VTargetDim> CastedRegType;
199 const CastedRegType* pCastedReg =
dynamic_cast<const CastedRegType*
>(m_spRegistration.GetPointer());
203 mapDefaultExceptionMacro(<<
"Error. Cannot map point. Registration has invalid dimension. Point: " << inPoint);
206 result = pCastedReg->mapPointInverse(tempInP,tempOutP);
209 outPoint.CastFrom(tempOutP);
244 void PrecomputeDirectMapping();
251 void PrecomputeInverseMapping();
253 map::core::RegistrationBase* GetRegistration();
254 const map::core::RegistrationBase* GetRegistration()
const;
256 void SetRegistration(map::core::RegistrationBase* pReg);
259 virtual void PrintSelf (std::ostream &os, itk::Indent indent)
const;
itk::SmartPointer< Self > Pointer
Standard implementation of BaseGeometry.
::map::core::RegistrationBase::ValueType ValueType
Base of all data objects.
bool MapPoint(const ::itk::Point< mitk::ScalarType, VMovingDim > &inPoint,::itk::Point< mitk::ScalarType, VTargetDim > &outPoint) const
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
#define MITKMATCHPOINTREGISTRATION_EXPORT
ValueType
Type of the value held by a Value object.
#define mitkClassMacro(className, SuperClassName)
bool MapPointInverse(const ::itk::Point< mitk::ScalarType, VTargetDim > &inPoint,::itk::Point< mitk::ScalarType, VMovingDim > &outPoint) const
::map::core::RegistrationBase::TagMapType TagMapType
map::core::RegistrationBase::Pointer m_spRegistration