00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision: 7707 $ 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 SLICESSWIVELLER_H_HEADER_INCLUDED 00020 #define SLICESSWIVELLER_H_HEADER_INCLUDED 00021 00022 #include <mitkSlicesCoordinator.h> 00023 #include <mitkVector.h> 00024 00025 #include <itkEventObject.h> 00026 00027 namespace mitk { 00028 00063 class MITK_CORE_EXPORT SlicesSwiveller : public SlicesCoordinator 00064 { 00065 public: 00066 00067 mitkClassMacro(SlicesSwiveller, SlicesCoordinator); 00068 00069 static Pointer New(); 00073 mitkNewMacro1Param(Self, const char*); 00074 00075 virtual void SetGeometry(const itk::EventObject& EventObject); 00076 00077 protected: 00078 SlicesSwiveller(const char* machine); 00079 00080 // clear list of controllers 00081 virtual ~SlicesSwiveller(); 00082 00083 // check if the slices of this SliceNavigationController can be rotated (???) Possible 00084 virtual void OnSliceControllerAdded(SliceNavigationController* snc); 00085 00086 virtual void OnSliceControllerRemoved(SliceNavigationController* snc); 00087 00088 virtual void UpdateRelevantSNCs(); 00089 00090 virtual bool ExecuteAction(Action * action, StateEvent const* stateEvent); 00091 00092 00094 SNCVector m_RelevantSNCs; 00095 00097 SNCVector m_SNCsToBeRotated; 00098 00099 Point3D m_LastCursorPosition; 00100 00101 Point3D m_CenterOfRotation; 00102 00103 Point2D m_ReferenceCursor; 00104 00105 Vector3D m_RotationPlaneNormal; 00106 Vector3D m_RotationPlaneXVector; 00107 Vector3D m_RotationPlaneYVector; 00108 00109 Vector3D m_PreviousRotationAxis; 00110 ScalarType m_PreviousRotationAngle; 00111 00112 }; 00113 00114 } // namespace 00115 00116 #endif 00117 00118