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 #ifndef __SeedsInteractor_H 00019 #define __SeedsInteractor_H 00020 00021 #include <mitkCommon.h> 00022 #include "MitkExtExports.h" 00023 #include <mitkInteractor.h> 00024 #include <mitkVector.h> 00025 #include <mitkImageAccessByItk.h>//needed by QmitkSimplexMeshes (SMDeformation.cpp and LungSegmentation.cpp) 00026 #include <mitkDataNode.h> 00027 #include <mitkSeedsImage.h> 00028 00029 00030 namespace mitk { 00031 00032 //##Documentation 00033 //## @brief SeedsInteractor handles all actions on the seedsimage 00034 //## @ingroup Interaction 00035 class MitkExt_EXPORT SeedsInteractor : public Interactor 00036 { 00037 public: 00038 mitkClassMacro(SeedsInteractor, Interactor); 00039 mitkNewMacro2Param(Self, const char*, DataNode*); 00040 00042 void SetRadius(int val){m_Radius=val;}; 00043 void SetCurrentDrawState(int val){m_CurrentDrawState = val;}; 00044 00045 itkSetMacro(Config, unsigned int); 00046 itkGetMacro(Config, unsigned int); 00047 00048 protected: 00052 SeedsInteractor(const char * type, DataNode* dataNode); 00056 virtual ~SeedsInteractor(); 00057 00058 virtual bool ExecuteAction(Action* action, StateEvent const* stateEvent); 00059 00060 protected: 00061 SeedsImage::Pointer m_SeedsImage; 00062 SeedsImage::Pointer m_LastSeedsImage; 00063 Point3D event_point; 00064 Point3D last_point; 00065 00066 int m_Radius; 00067 int m_DrawState; 00068 int m_CurrentDrawState; 00069 unsigned int m_Config; // determine whether 254,255 or smoothed float values are used. 00070 }; 00071 00072 } 00073 #endif //__SeedsInteractor_H