00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKLANDMARKPROJECTOR_H_HEADER_INCLUDED_C1C68A2C 00020 #define MITKLANDMARKPROJECTOR_H_HEADER_INCLUDED_C1C68A2C 00021 00022 #include "mitkCommon.h" 00023 #include "itkObject.h" 00024 00025 #include "mitkPlaneGeometry.h" 00026 #include "mitkPointSet.h" 00027 00028 class vtkAbstractTransform; 00029 00030 namespace mitk { 00031 00032 //##Documentation 00033 //## @brief Base-class of landmark-projectors, which project the target landmarks 00034 //## to create source landmarks. 00035 //## 00036 //## @ingroup Geometry 00037 class MITK_CORE_EXPORT LandmarkProjector : public itk::Object 00038 { 00039 public: 00040 mitkClassMacro(LandmarkProjector, itk::Object); 00041 00042 //##Documentation 00043 //## @brief Set the interpolating (world-space-to-world-space) transform, 00044 //## which uses the landmarks. 00045 //## 00046 //## \sa GetCompleteAbstractTransform 00047 virtual void SetInterpolatingAbstractTransform(vtkAbstractTransform* anInterpolatingAbstractTransform); 00048 //##Documentation 00049 //## @brief Get the interpolating (world-space-to-world-space) transform, 00050 //## which uses the landmarks. 00051 //## 00052 //## \sa GetCompleteAbstractTransform 00053 //## \sa ComputeCompleteAbstractTransform 00054 itkGetConstMacro(InterpolatingAbstractTransform, vtkAbstractTransform*); 00055 00056 //##Documentation 00057 //## @brief Set frame geometry within which the interpolation shall occur. 00058 //## 00059 //## Used as a hint, may be ignored depending on the concrete sub-classes. 00060 itkSetConstObjectMacro(FrameGeometry, mitk::Geometry3D); 00061 //##Documentation 00062 //## @brief Get frame geometry within which the interpolation shall occur. 00063 //## 00064 //## Used as a hint, may be ignored depending on the concrete sub-classes. 00065 itkGetConstObjectMacro(FrameGeometry, mitk::Geometry3D); 00066 00067 //##Documentation 00068 //## @brief Get the parameter plane for use in AbstractTransformGeometry::SetPlane. 00069 //## 00070 itkGetConstObjectMacro(ParameterPlane, mitk::PlaneGeometry); 00071 00072 //##Documentation 00073 //## @brief Get the projected landmarks. 00074 //## 00075 //## @note Valid only after calling ProjectLandmarks. 00076 itkGetConstObjectMacro(ProjectedLandmarks, mitk::PointSet::DataType::PointsContainer); 00077 //##Documentation 00078 //## @brief Get the final target landmarks to use for the interpolating transform. 00079 //## 00080 //## @note Valid only after calling ProjectLandmarks. 00081 itkGetConstObjectMacro(FinalTargetLandmarks, mitk::PointSet::DataType::PointsContainer); 00082 00083 //##Documentation 00084 //## @brief Get the transform from parameter space to world space incorporating 00085 //## the given interpolating transform, which uses the landmarks. 00086 //## 00087 //## \sa ComputeCompleteAbstractTransform 00088 //## \sa SetInterpolatingAbstractTransform 00089 virtual vtkAbstractTransform* GetCompleteAbstractTransform() const; 00090 00091 virtual void ProjectLandmarks(const mitk::PointSet::DataType::PointsContainer* targetLandmarks) = 0; 00092 00093 protected: 00094 LandmarkProjector(); 00095 virtual ~LandmarkProjector(); 00096 00097 //##Documentation 00098 //## @brief Compute the transform from parameter space to world space incorporating 00099 //## the given interpolating transform, which uses the landmarks. 00100 //## 00101 //## Called after a new interpolating transform is set via 00102 //## SetInterpolatingAbstractTransform(). 00103 //## \sa SetInterpolatingAbstractTransform 00104 //## \sa GetCompleteAbstractTransform 00105 virtual void ComputeCompleteAbstractTransform() = 0; 00106 00107 vtkAbstractTransform* m_InterpolatingAbstractTransform; 00108 vtkAbstractTransform* m_CompleteAbstractTransform; 00109 mitk::Geometry3D::ConstPointer m_FrameGeometry; 00110 mutable mitk::PlaneGeometry::ConstPointer m_ParameterPlane; 00111 mitk::PointSet::DataType::PointsContainer::Pointer m_WritableFinalTargetLandmarks; 00112 mitk::PointSet::DataType::PointsContainer::ConstPointer m_FinalTargetLandmarks; 00113 mitk::PointSet::DataType::PointsContainer::Pointer m_ProjectedLandmarks; 00114 }; 00115 00116 } // namespace mitk 00117 00118 #endif /* MITKLANDMARKPROJECTOR_H_HEADER_INCLUDED_C1C68A2C */