21 #include "mapRegistrationKernel.h"
45 if (registration &&
is3D(registration))
68 typedef ::map::core::RegistrationKernel<3,3> KernelType;
70 const KernelType* pModelKernel =
dynamic_cast<const KernelType*
>(&kernel);
75 KernelType::TransformType::MatrixType matrix;
76 KernelType::TransformType::OutputVectorType
offset;
78 if(pModelKernel->getAffineMatrixDecomposition(matrix,offset))
81 Affine3DTransformType::MatrixType resultMatrix;
82 Affine3DTransformType::OffsetType resultOffset;
90 for (
unsigned int i=0; i<matrix.GetVnlMatrix().size(); ++i)
92 resultMatrix.GetVnlMatrix().begin()[i] =
static_cast<mitk::ScalarType>(matrix.GetVnlMatrix().begin()[i]);
94 resultOffset.CastFrom(offset);
96 result->SetMatrix(resultMatrix);
97 result->SetOffset(resultOffset);
120 result = reBase->getMovingDimensions()==3 && reBase->getTargetDimensions()==3;
127 if (!node)
return false;
133 return std::string(
"MAPRegistrationWrapper").compare(data->GetNameOfClass()) == 0;
static Affine3DTransformType::Pointer getAffineMatrix(const mitk::MAPRegistrationWrapper *wrapper, bool inverseKernel)
itk::SmartPointer< Self > Pointer
Base of all data objects.
DataCollection - Class to facilitate loading/accessing structured data.
::map::core::RegistrationBase RegistrationBaseType
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
MAPRegistrationWrapper Wrapper class to allow the handling of MatchPoint registration objects as mitk...
virtual unsigned int GetMovingDimensions() const
Gets the number of moving dimensions.
map::core::RegistrationBase * GetRegistration()
static bool is3D(const mitk::MAPRegistrationWrapper *wrapper)
::map::core::Registration< 3, 3 > Registration3DType
static bool IsRegNode(const mitk::DataNode *node)
virtual unsigned int GetTargetDimensions() const
Gets the number of target dimensions.
Class for nodes of the DataTree.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.