diff --git a/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.cpp b/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.cpp index 5106754011..da85c2e3e1 100644 --- a/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.cpp +++ b/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.cpp @@ -1,64 +1,62 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "mitkExternAbstractTransformGeometry.h" #include mitk::ExternAbstractTransformGeometry::ExternAbstractTransformGeometry() { } +mitk::ExternAbstractTransformGeometry::ExternAbstractTransformGeometry(const ExternAbstractTransformGeometry& other) : Superclass(other) +{ +} mitk::ExternAbstractTransformGeometry::~ExternAbstractTransformGeometry() { } void mitk::ExternAbstractTransformGeometry::SetVtkAbstractTransform(vtkAbstractTransform* aVtkAbstractTransform) { Superclass::SetVtkAbstractTransform(aVtkAbstractTransform); } void mitk::ExternAbstractTransformGeometry::SetPlane(const mitk::PlaneGeometry* aPlane) { Superclass::SetPlane(aPlane); } void mitk::ExternAbstractTransformGeometry::SetParametricBounds(const BoundingBox::BoundsArrayType& bounds) { Superclass::SetParametricBounds(bounds); //@warning affine-transforms and bounding-box should be set by specific sub-classes! SetBounds(bounds); if(m_Plane.IsNotNull()) { m_Plane->SetSizeInUnits(bounds[1]-bounds[0], bounds[3]-bounds[2]); m_Plane->SetBounds(bounds); } } mitk::AffineGeometryFrame3D::Pointer mitk::ExternAbstractTransformGeometry::Clone() const { - Self::Pointer newGeometry = Self::New(); - newGeometry->Initialize(); - InitializeGeometry(newGeometry); + Self::Pointer newGeometry = new ExternAbstractTransformGeometry(*this); + newGeometry->UnRegister(); return newGeometry.GetPointer(); } -void mitk::ExternAbstractTransformGeometry::InitializeGeometry(Self * newGeometry) const -{ - Superclass::InitializeGeometry(newGeometry); -} diff --git a/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.h b/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.h index fed23bb175..8577802bf5 100644 --- a/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.h +++ b/Modules/MitkExt/DataManagement/mitkExternAbstractTransformGeometry.h @@ -1,71 +1,71 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef MITKEXTERNABSTRACTTRANSFORMPLANEGEOMETRY_H_HEADER_INCLUDED_C1C68A2C #define MITKEXTERNABSTRACTTRANSFORMPLANEGEOMETRY_H_HEADER_INCLUDED_C1C68A2C #include "mitkCommon.h" #include "MitkExtExports.h" #include "mitkAbstractTransformGeometry.h" namespace mitk { //##Documentation //## @brief Identical with AbstractTransformGeometry, except that //## it can be externally configured. //## //## In contrast to its superclass (AbstractTransformGeometry), this class //## provides write access to the vtkAbstractTransform and m_Plane. //## @note The PlaneGeometry is cloned, @em not linked/referenced. //## @note The bounds of the PlaneGeometry are used as the parametric bounds. //## @sa AbstractTransformGeometry //## @ingroup Geometry class MitkExt_EXPORT ExternAbstractTransformGeometry : public AbstractTransformGeometry { public: mitkClassMacro(ExternAbstractTransformGeometry, AbstractTransformGeometry); itkNewMacro(Self); //##Documentation //## @brief Set the vtkAbstractTransform (stored in m_VtkAbstractTransform) virtual void SetVtkAbstractTransform(vtkAbstractTransform* aVtkAbstractTransform); //##Documentation //## @brief Set the rectangular area that is used for transformation by //## m_VtkAbstractTransform and therewith defines the 2D manifold described by //## ExternAbstractTransformGeometry //## //## @note The bounds of the PlaneGeometry are used as the parametric bounds. //## @note The PlaneGeometry is cloned, @em not linked/referenced. virtual void SetPlane(const mitk::PlaneGeometry* aPlane); virtual void SetParametricBounds(const BoundingBox::BoundsArrayType& bounds); virtual AffineGeometryFrame3D::Pointer Clone() const; protected: ExternAbstractTransformGeometry(); + ExternAbstractTransformGeometry(const ExternAbstractTransformGeometry& other); virtual ~ExternAbstractTransformGeometry(); - void InitializeGeometry(Self * newGeometry) const; }; } // namespace mitk #endif /* MITKEXTERNABSTRACTTRANSFORMPLANEGEOMETRY_H_HEADER_INCLUDED_C1C68A2C */