19 #include "mapRegistrationKernel.h" 28 MITKRegistrationHelper::Affine3DTransformType::Pointer
32 Affine3DTransformType::Pointer result =
nullptr;
41 MITKRegistrationHelper::Affine3DTransformType::Pointer
45 Affine3DTransformType::Pointer result =
nullptr;
47 if (registration &&
is3D(registration))
68 Affine3DTransformType::Pointer result =
nullptr;
70 typedef ::map::core::RegistrationKernel<3,3> KernelType;
72 const KernelType* pModelKernel =
dynamic_cast<const KernelType*
>(&kernel);
77 KernelType::TransformType::MatrixType matrix;
78 KernelType::TransformType::OutputVectorType
offset;
80 if(pModelKernel->getAffineMatrixDecomposition(matrix,offset))
82 result = Affine3DTransformType::New();
83 Affine3DTransformType::MatrixType resultMatrix;
84 Affine3DTransformType::OffsetType resultOffset;
92 for (
unsigned int i=0; i<matrix.GetVnlMatrix().size(); ++i)
94 resultMatrix.GetVnlMatrix().begin()[i] =
static_cast<mitk::ScalarType>(matrix.GetVnlMatrix().begin()[i]);
96 resultOffset.CastFrom(offset);
98 result->SetMatrix(resultMatrix);
99 result->SetOffset(resultOffset);
122 result = reBase->getMovingDimensions()==3 && reBase->getTargetDimensions()==3;
129 if (!node)
return false;
131 return InternalRegNodePredicate->CheckNode(node);
136 return InternalRegNodePredicate.GetPointer();
141 return InternalImageNodePredicate.GetPointer();
146 return InternalPointSetNodePredicate.GetPointer();
static Affine3DTransformType::Pointer getAffineMatrix(const mitk::MAPRegistrationWrapper *wrapper, bool inverseKernel)
static NodePredicateBase::ConstPointer RegNodePredicate()
virtual unsigned int GetTargetDimensions() const
Gets the number of target dimensions.
static Affine3DTransformType::Pointer getAffineMatrix(const RegistrationBaseType *registration, bool inverseKernel)
static NodePredicateBase::ConstPointer ImageNodePredicate()
DataCollection - Class to facilitate loading/accessing structured data.
::map::core::RegistrationBase RegistrationBaseType
mitk::NodePredicateDataType::ConstPointer InternalPointSetNodePredicate
MAPRegistrationWrapper Wrapper class to allow the handling of MatchPoint registration objects as mitk...
static const char * GetStaticNameOfClass()
static const char * GetStaticNameOfClass()
::map::core::RegistrationBase * GetRegistration()
static bool is3D(const mitk::MAPRegistrationWrapper *wrapper)
mitk::NodePredicateDataType::ConstPointer InternalRegNodePredicate
static NodePredicateBase::ConstPointer PointSetNodePredicate()
static Pointer New(const char *_arg)
static const char * GetStaticNameOfClass()
::map::core::Registration< 3, 3 > Registration3DType
static bool IsRegNode(const mitk::DataNode *node)
mitk::NodePredicateDataType::ConstPointer InternalImageNodePredicate
Class for nodes of the DataTree.
virtual unsigned int GetMovingDimensions() const
Gets the number of moving dimensions.