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 SLICESROTATOR_H_HEADER_INCLUDED_C1C55A2F 00020 #define SLICESROTATOR_H_HEADER_INCLUDED_C1C55A2F 00021 00022 #include <mitkSlicesCoordinator.h> 00023 #include <itkEventObject.h> 00024 #include <mitkVector.h> 00025 00026 namespace mitk { 00027 00063 class MITK_CORE_EXPORT SlicesRotator : public SlicesCoordinator 00064 { 00065 public: 00066 00067 mitkClassMacro(SlicesRotator, SlicesCoordinator); 00068 00069 static Pointer New(); 00070 00074 mitkNewMacro1Param(Self, const char*); 00075 00076 virtual void SetGeometry(const itk::EventObject& EventObject); 00077 00078 virtual void RotateToPoint( SliceNavigationController *rotationPlaneSNC, 00079 SliceNavigationController *rotatedPlaneSNC, 00080 const Point3D &point, bool linked = false ); 00081 00082 protected: 00083 00084 SlicesRotator(const char* machine); 00085 // clear list of controllers 00086 virtual ~SlicesRotator(); 00087 00088 // check if the slices of this SliceNavigationController can be rotated (???) Possible 00089 virtual void OnSliceControllerAdded(SliceNavigationController* snc); 00090 00091 virtual void OnSliceControllerRemoved(SliceNavigationController* snc); 00092 00093 virtual void UpdateRelevantSNCs(); 00094 00095 virtual bool ExecuteAction(Action * action, StateEvent const* stateEvent); 00096 00097 SNCVector m_RelevantSNCs; 00098 SNCVector m_SNCsToBeRotated; 00099 00100 Point3D m_LastCursorPosition; 00101 Point3D m_CenterOfRotation; 00102 00103 }; 00104 00105 } // namespace 00106 00107 #endif 00108 00109