00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision: 13561 $ 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 MITKSURFACEINTERACTOR_H_HEADER_INCLUDED 00020 #define MITKSURFACEINTERACTOR_H_HEADER_INCLUDED 00021 00022 #include "mitkAffineInteractor.h" 00023 #include "MitkExtExports.h" 00024 #include "mitkPointLocator.h" 00025 00026 namespace mitk { 00027 00028 //##Documentation 00029 //## @brief Interactor for Affine transformations on one or multiple surfaces 00030 //## 00031 //## A surface interacted by this class can translate, rotate and scale 00032 //## by modifying its geometry. The surface closest to the picking point is 00033 //## chosen for interaction automatically by CanHandleEvent 00034 //## @ingroup Interaction 00035 class MitkExt_EXPORT SurfaceInteractor : public AffineInteractor 00036 { 00037 public: 00038 mitkClassMacro(SurfaceInteractor,AffineInteractor); 00039 // itkNewMacro(Self); 00040 mitkNewMacro2Param(Self, const char*, DataNode*); 00041 00042 protected: 00043 00044 //##Documentation 00045 //## @brief Constructor 00046 //## 00047 //## @param dataNode is the node, this Interactor is connected to 00048 //## @param type is the type of StateMachine like declared in the XML-Configure-File 00049 SurfaceInteractor(const char * type, DataNode* dataNode); 00050 00051 //##Documentation 00052 //## @brief Destructor 00053 ~SurfaceInteractor(){}; 00054 00055 //##Documentation 00056 //## @brief calculates how good the data this state machine handles is hit by the event. 00057 //## 00058 //## Returns a value between 0 and 1. 00059 //## (Used by GlobalInteraction to decide which DESELECTED state machine to send the event to.) 00060 //## 00061 //## \WARNING This is interactor currently does not work for interaction in 3D. Try using mitkAffineInteractor3D instead. 00062 virtual float CanHandleEvent(StateEvent const* stateEvent) const; 00063 00064 private: 00065 00066 typedef PointLocator PLocType; 00067 typedef PLocType::Pointer PLPointer; 00068 00069 PLPointer m_PtLoc; 00070 00071 }; 00072 00073 } // namespace mitk 00074 00075 #endif /* MITKSURFACEINTERACTOR_H_HEADER_INCLUDED */