18 #include <vtkAbstractTransform.h>
22 m_LandmarkProjector(nullptr),
23 m_InterpolatingAbstractTransform(nullptr),
24 m_TargetLandmarks(nullptr)
39 if (m_InterpolatingAbstractTransform !=
nullptr)
40 m_InterpolatingAbstractTransform->Delete();
45 itkDebugMacro(
"setting LandmarkProjector to " << aLandmarkProjector);
46 if (m_LandmarkProjector != aLandmarkProjector)
48 m_LandmarkProjector = aLandmarkProjector;
49 if (m_LandmarkProjector.IsNotNull())
51 if (m_FrameGeometry.IsNotNull())
54 if (m_InterpolatingAbstractTransform ==
nullptr)
56 itkWarningMacro(<<
"m_InterpolatingAbstractTransform not set.");
58 m_LandmarkProjector->SetInterpolatingAbstractTransform(GetInterpolatingAbstractTransform());
60 SetVtkAbstractTransform(m_LandmarkProjector->GetCompleteAbstractTransform());
68 Superclass::SetFrameGeometry(frameGeometry);
69 if (m_LandmarkProjector.IsNotNull())
70 m_LandmarkProjector->SetFrameGeometry(frameGeometry);
75 if (m_LandmarkProjector.IsNull())
77 itkExceptionMacro(<<
"m_LandmarkProjector is not set.");
79 m_LandmarkProjector->ProjectLandmarks(m_TargetLandmarks);
80 SetPlane(m_LandmarkProjector->GetParameterPlane());
85 newGeometry->UnRegister();
86 return newGeometry.GetPointer();
LandmarkProjectorBasedCurvedGeometry()
virtual void ComputeGeometry()
itk::SmartPointer< Self > Pointer
Superclass of AbstractTransformGeometry sub-classes defined by a set of landmarks.
mitk::LandmarkProjector::Pointer m_LandmarkProjector
virtual void SetTargetLandmarks(const mitk::PointSet::DataType::PointsContainer *_arg)
Set the landmarks through which the geometry shall pass.
Base-class of landmark-projectors, which project the target landmarks to create source landmarks...
itk::LightObject::Pointer InternalClone() const override
clones the geometry
mitk::PointSet::DataType::PointsContainer::ConstPointer m_TargetLandmarks
virtual void SetFrameGeometry(const mitk::BaseGeometry *frameGeometry) override
Set the frame geometry which is used as the standard part of an BaseGeometry (IndexToWorldTransform a...
virtual void SetFrameGeometry(const mitk::BaseGeometry *_arg)
Set frame geometry within which the interpolation shall occur.
virtual ~LandmarkProjectorBasedCurvedGeometry()
Describes a two-dimensional, rectangular plane.
BaseGeometry Describes the geometry of a data object.
void SetLandmarkProjector(mitk::LandmarkProjector *aLandmarkProjector)