diff --git a/Modules/ClippingTools/mitkClippingPlaneDeformationTool.cpp b/Modules/ClippingTools/mitkClippingPlaneDeformationTool.cpp index 6d97627ff3..b7ae93c585 100644 --- a/Modules/ClippingTools/mitkClippingPlaneDeformationTool.cpp +++ b/Modules/ClippingTools/mitkClippingPlaneDeformationTool.cpp @@ -1,74 +1,66 @@ #include "mitkClippingPlaneDeformationTool.h" - #include "mitkClippingPlaneDeformationTool.xpm" -#include "mitkToolManager.h" - #include "mitkBaseRenderer.h" -#include "mitkRenderingManager.h" #include "mitkGlobalInteraction.h" +#include "mitkRenderingManager.h" +#include "mitkToolManager.h" namespace mitk{ - MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneDeformationTool, "Clipping Plane Deformation"); + MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneDeformationTool, "Clipping Tool Deformation"); } mitk::ClippingPlaneDeformationTool::ClippingPlaneDeformationTool() : Tool( "global" ) { } mitk::ClippingPlaneDeformationTool::~ClippingPlaneDeformationTool() { } const char** mitk::ClippingPlaneDeformationTool::GetXPM() const { return mitkClippingPlaneDeformationTool_xpm; } const char* mitk::ClippingPlaneDeformationTool::GetName() const { return "Deformation"; } const char* mitk::ClippingPlaneDeformationTool::GetGroup() const { - return "ClippingPlane"; + return "ClippingTool"; } void mitk::ClippingPlaneDeformationTool::Activated() { Superclass::Activated(); //check if the Clipping plane is changed. - if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData( 0 )) + if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData(0)) { - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_SurfaceInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_SurfaceInteractor); this->ClippingPlaneChanged(); } - mitk::GlobalInteraction::GetInstance()->AddInteractor( m_SurfaceInteractor ); + mitk::GlobalInteraction::GetInstance()->AddInteractor(m_SurfaceInteractor); } void mitk::ClippingPlaneDeformationTool::Deactivated() { Superclass::Deactivated(); - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_SurfaceInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_SurfaceInteractor); } //Checks the working data node, if it has an interactor. Otherwise initial a new one. void mitk::ClippingPlaneDeformationTool::ClippingPlaneChanged() { m_ClippingPlaneNode = m_ToolManager->GetWorkingData(0); m_SurfaceInteractor = dynamic_cast(m_ClippingPlaneNode->GetInteractor()); if (m_SurfaceInteractor.IsNull()) - { - m_SurfaceInteractor = mitk::SurfaceDeformationInteractor3D::New( - "AffineInteractor3D", m_ClippingPlaneNode ); - } -} - - - + m_SurfaceInteractor = mitk::SurfaceDeformationInteractor3D::New("AffineInteractor3D", m_ClippingPlaneNode); +} \ No newline at end of file diff --git a/Modules/ClippingTools/mitkClippingPlaneDeformationTool.h b/Modules/ClippingTools/mitkClippingPlaneDeformationTool.h index 212d0dde0b..ffacaf690f 100644 --- a/Modules/ClippingTools/mitkClippingPlaneDeformationTool.h +++ b/Modules/ClippingTools/mitkClippingPlaneDeformationTool.h @@ -1,70 +1,67 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit -Module: $RCSfile: mitk.cpp,v $ +Module: $RCSfile: $ Language: C++ -Date: $Date: 2009-04-18 20:20:25 +0200 (Sa, 18 Apr 2009) $ -Version: $Revision: 12952 $ +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 mitkClippingPlaneDeformationTool_h_Included #define mitkClippingPlaneDeformationTool_h_Included +#include "ClippingToolsExports.h" + #include "mitkCommon.h" -#include "mitkVector.h" -#include "mitkTool.h" #include "mitkDataNode.h" #include "mitkSurfaceDeformationInteractor3D.h" -#include "ClippingToolsExports.h" - +#include "mitkTool.h" +#include "mitkVector.h" namespace mitk { + /** + \brief A tool with whom you can deform planes. + */ + class ClippingTools_EXPORT ClippingPlaneDeformationTool : public Tool + { + public: -/** -\brief -*/ -class ClippingTools_EXPORT ClippingPlaneDeformationTool : public Tool -{ -public: - - mitkClassMacro(ClippingPlaneDeformationTool, Tool); - itkNewMacro(ClippingPlaneDeformationTool); + mitkClassMacro(ClippingPlaneDeformationTool, Tool); + itkNewMacro(ClippingPlaneDeformationTool); - virtual const char** GetXPM() const; - virtual const char* GetName() const; - virtual const char* GetGroup() const; + virtual const char** GetXPM() const; + virtual const char* GetName() const; + virtual const char* GetGroup() const; -protected: + protected: - ClippingPlaneDeformationTool(); // purposely hidden - virtual ~ClippingPlaneDeformationTool(); + ClippingPlaneDeformationTool(); // purposely hidden + virtual ~ClippingPlaneDeformationTool(); - virtual void Activated(); - virtual void Deactivated(); + virtual void Activated(); + virtual void Deactivated(); - mitk::DataNode::Pointer m_ClippingPlaneNode; - mitk::SurfaceDeformationInteractor3D::Pointer m_SurfaceInteractor; + mitk::DataNode::Pointer m_ClippingPlaneNode; + mitk::SurfaceDeformationInteractor3D::Pointer m_SurfaceInteractor; private: - void ClippingPlaneChanged(); -}; + void ClippingPlaneChanged(); + }; } //end namespace mitk - - #endif diff --git a/Modules/ClippingTools/mitkClippingPlaneRotationTool.cpp b/Modules/ClippingTools/mitkClippingPlaneRotationTool.cpp index e08fb0d21a..4e7c6b18e4 100644 --- a/Modules/ClippingTools/mitkClippingPlaneRotationTool.cpp +++ b/Modules/ClippingTools/mitkClippingPlaneRotationTool.cpp @@ -1,74 +1,69 @@ #include "mitkClippingPlaneRotationTool.h" - #include "mitkClippingPlaneRotationTool.xpm" -#include "mitkToolManager.h" - #include "mitkBaseRenderer.h" -#include "mitkRenderingManager.h" #include "mitkGlobalInteraction.h" +#include "mitkRenderingManager.h" +#include "mitkToolManager.h" + -namespace mitk{ - MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneRotationTool, "Clipping Plane Rotation"); +namespace mitk +{ + MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneRotationTool, "Clipping Tool Rotation"); } mitk::ClippingPlaneRotationTool::ClippingPlaneRotationTool() : Tool( "global" ) { } mitk::ClippingPlaneRotationTool::~ClippingPlaneRotationTool() { } const char** mitk::ClippingPlaneRotationTool::GetXPM() const { return mitkClippingPlaneRotationTool_xpm; } const char* mitk::ClippingPlaneRotationTool::GetName() const { return "Rotation"; } const char* mitk::ClippingPlaneRotationTool::GetGroup() const { - return "ClippingPlane"; + return "ClippingTool"; } void mitk::ClippingPlaneRotationTool::Activated() { Superclass::Activated(); //check if the Clipping plane is changed. - if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData( 0 )) + if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData(0)) { - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); this->ClippingPlaneChanged(); } m_AffineInteractor->SetInteractionModeToRotation(); - mitk::GlobalInteraction::GetInstance()->AddInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->AddInteractor(m_AffineInteractor); } void mitk::ClippingPlaneRotationTool::Deactivated() { Superclass::Deactivated(); - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); } //Checks the working data node, if it has an interactor. Otherwise initial a new one. void mitk::ClippingPlaneRotationTool::ClippingPlaneChanged() { m_ClippingPlaneNode = m_ToolManager->GetWorkingData(0); m_AffineInteractor = dynamic_cast(m_ClippingPlaneNode->GetInteractor()); if (m_AffineInteractor.IsNull()) - { - m_AffineInteractor = mitk::AffineInteractor3D::New( - "AffineInteractor3D", m_ClippingPlaneNode ); - } -} - - + m_AffineInteractor = mitk::AffineInteractor3D::New("AffineInteractor3D", m_ClippingPlaneNode); +} \ No newline at end of file diff --git a/Modules/ClippingTools/mitkClippingPlaneRotationTool.h b/Modules/ClippingTools/mitkClippingPlaneRotationTool.h index 361536c09f..cd8cd02313 100644 --- a/Modules/ClippingTools/mitkClippingPlaneRotationTool.h +++ b/Modules/ClippingTools/mitkClippingPlaneRotationTool.h @@ -1,71 +1,68 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit -Module: $RCSfile: mitk.cpp,v $ +Module: $RCSfile: $ Language: C++ -Date: $Date: 2009-04-18 20:20:25 +0200 (Sa, 18 Apr 2009) $ -Version: $Revision: 12952 $ +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 mitkClippingPlaneRotationTool_h_Included #define mitkClippingPlaneRotationTool_h_Included -#include "mitkCommon.h" -#include "mitkVector.h" -#include "mitkTool.h" -#include "mitkDataNode.h" -#include "mitkAffineInteractor3D.h" -//#include "MitkExtExports.h" #include "ClippingToolsExports.h" +#include "mitkAffineInteractor3D.h" +#include "mitkCommon.h" +#include "mitkDataNode.h" +#include "mitkTool.h" +#include "mitkVector.h" namespace mitk { /** - \brief + \brief A tool which allows you to rotate planes. */ class ClippingTools_EXPORT ClippingPlaneRotationTool : public Tool { public: mitkClassMacro(ClippingPlaneRotationTool, Tool); itkNewMacro(ClippingPlaneRotationTool); virtual const char** GetXPM() const; virtual const char* GetName() const; virtual const char* GetGroup() const; protected: ClippingPlaneRotationTool(); // purposely hidden virtual ~ClippingPlaneRotationTool(); virtual void Activated(); virtual void Deactivated(); - mitk::DataNode::Pointer m_ClippingPlaneNode; + mitk::DataNode::Pointer m_ClippingPlaneNode; mitk::AffineInteractor3D::Pointer m_AffineInteractor; private: void ClippingPlaneChanged(); }; } //end namespace mitk - - #endif diff --git a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp index 24ef244588..829307abbb 100644 --- a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp +++ b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp @@ -1,72 +1,68 @@ #include "mitkClippingPlaneTranslationTool.h" - #include "mitkClippingPlaneTranslationTool.xpm" -#include "mitkToolManager.h" - #include "mitkBaseRenderer.h" -#include "mitkRenderingManager.h" #include "mitkGlobalInteraction.h" +#include "mitkRenderingManager.h" +#include "mitkToolManager.h" -namespace mitk { - MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneTranslationTool, "Clipping Plane Translation"); +namespace mitk +{ + MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneTranslationTool, "Clipping Tool Translation"); } mitk::ClippingPlaneTranslationTool::ClippingPlaneTranslationTool() : Tool( "global" ) { } mitk::ClippingPlaneTranslationTool::~ClippingPlaneTranslationTool() { } const char** mitk::ClippingPlaneTranslationTool::GetXPM() const { return mitkClippingPlaneTranslationTool_xpm; } const char* mitk::ClippingPlaneTranslationTool::GetName() const { return "Translation"; } const char* mitk::ClippingPlaneTranslationTool::GetGroup() const { - return "ClippingPlane"; + return "ClippingTool"; } void mitk::ClippingPlaneTranslationTool::Activated() { Superclass::Activated(); //check if the Clipping plane is changed. - if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData( 0 )) + if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData(0)) { - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); this->ClippingPlaneChanged(); } m_AffineInteractor->SetInteractionModeToTranslation(); - mitk::GlobalInteraction::GetInstance()->AddInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->AddInteractor(m_AffineInteractor); } void mitk::ClippingPlaneTranslationTool::Deactivated() { Superclass::Deactivated(); - mitk::GlobalInteraction::GetInstance()->RemoveInteractor( m_AffineInteractor ); + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); } //Checks the working data node, if it has an interactor. Otherwise initial a new one. void mitk::ClippingPlaneTranslationTool::ClippingPlaneChanged() { m_ClippingPlaneNode = m_ToolManager->GetWorkingData(0); m_AffineInteractor = dynamic_cast(m_ClippingPlaneNode->GetInteractor()); if (m_AffineInteractor.IsNull()) - { - m_AffineInteractor = mitk::AffineInteractor3D::New( - "AffineInteractor3D", m_ClippingPlaneNode ); - } -} + m_AffineInteractor = mitk::AffineInteractor3D::New("AffineInteractor3D", m_ClippingPlaneNode); +} \ No newline at end of file diff --git a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h index b05a4e9eb8..d076f8ce38 100644 --- a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h +++ b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h @@ -1,72 +1,68 @@ /*========================================================================= - + Program: Medical Imaging & Interaction Toolkit -Module: $RCSfile: mitk.cpp,v $ +Module: $RCSfile: $ Language: C++ -Date: $Date: 2009-04-18 20:20:25 +0200 (Sa, 18 Apr 2009) $ -Version: $Revision: 12952 $ - +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 mitkClippingPlaneTranslationTool_h_Included #define mitkClippingPlaneTranslationTool_h_Included -#include "mitkCommon.h" -#include "mitkVector.h" -#include "mitkTool.h" -#include "mitkDataNode.h" -#include "mitkAffineInteractor3D.h" #include "ClippingToolsExports.h" - +#include "mitkAffineInteractor3D.h" +#include "mitkCommon.h" +#include "mitkDataNode.h" +#include "mitkTool.h" +#include "mitkVector.h" namespace mitk { -/** - \brief -*/ -class ClippingTools_EXPORT ClippingPlaneTranslationTool : public Tool -{ -public: - - mitkClassMacro(ClippingPlaneTranslationTool, Tool); - itkNewMacro(ClippingPlaneTranslationTool); + /** + \brief A tool which allows you to move planes. + */ + class ClippingTools_EXPORT ClippingPlaneTranslationTool : public Tool + { + public: - virtual const char** GetXPM() const; - virtual const char* GetName() const; - virtual const char* GetGroup() const; + mitkClassMacro(ClippingPlaneTranslationTool, Tool); + itkNewMacro(ClippingPlaneTranslationTool); + virtual const char** GetXPM() const; + virtual const char* GetName() const; + virtual const char* GetGroup() const; -protected: - ClippingPlaneTranslationTool(); // purposely hidden - virtual ~ClippingPlaneTranslationTool(); + protected: - virtual void Activated(); - virtual void Deactivated(); + ClippingPlaneTranslationTool(); // purposely hidden + virtual ~ClippingPlaneTranslationTool(); - mitk::DataNode::Pointer m_ClippingPlaneNode; + virtual void Activated(); + virtual void Deactivated(); - mitk::AffineInteractor3D::Pointer m_AffineInteractor; + mitk::DataNode::Pointer m_ClippingPlaneNode; + mitk::AffineInteractor3D::Pointer m_AffineInteractor; -private: + private: - void ClippingPlaneChanged(); -}; + void ClippingPlaneChanged(); + }; } //end namespace mitk - - #endif