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 SLICESCOORDINATOR_H_HEADER_INCLUDED_C1C55A2F 00020 #define SLICESCOORDINATOR_H_HEADER_INCLUDED_C1C55A2F 00021 00022 #include <mitkStateMachine.h> 00023 #include <vector> 00024 00025 namespace mitk { 00026 00027 class SliceNavigationController; 00028 class Action; 00029 class StateEvent; 00030 00031 itkEventMacro( SliceRotationEvent, itk::AnyEvent); 00032 00048 class MITK_CORE_EXPORT SlicesCoordinator : public StateMachine 00049 { 00050 public: 00051 00052 typedef std::vector<SliceNavigationController*> SNCVector; 00053 00054 mitkClassMacro(SlicesCoordinator, StateMachine); 00055 mitkNewMacro1Param(Self, const char*); 00056 00057 00060 void AddSliceController(SliceNavigationController* snc); 00061 00064 void RemoveSliceController(SliceNavigationController* snc); 00065 00066 /* Reset all Slices to central slice, no rotation */ 00067 // void ResetAllSlices(); 00068 00071 itkSetMacro( LinkPlanes, bool ); 00072 itkGetMacro( LinkPlanes, bool ); 00073 itkBooleanMacro( LinkPlanes ); 00074 00080 void ResetMouseCursor(); 00081 00082 00083 protected: 00085 SlicesCoordinator(const char* machine); 00086 00088 virtual ~SlicesCoordinator(); 00089 00094 void SetMouseCursor( const char *xpm[], int hotspotX, int hotspotY ); 00095 00097 virtual void OnSliceControllerAdded(SliceNavigationController* snc); 00098 00100 virtual void OnSliceControllerRemoved(SliceNavigationController* snc); 00101 00103 virtual bool ExecuteAction(Action * action, StateEvent const* stateEvent); 00104 00105 SNCVector m_SliceNavigationControllers; 00106 00107 bool m_LinkPlanes; 00108 00109 bool m_MouseCursorSet; 00110 00111 }; 00112 00113 } // namespace 00114 00115 #endif 00116 00117