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 MITKPOINTOPERATION_H 00020 #define MITKPOINTOPERATION_H 00021 00022 #include "mitkCommon.h" 00023 #include "mitkOperation.h" 00024 #include "mitkVector.h" 00025 00026 00027 00028 namespace mitk { 00029 00030 //##Documentation 00031 //## @brief Operation that handles all actions on one Point. 00032 //## 00033 //## Stores everything for Adding, Moving and Deleting a Point. 00034 //## @ingroup Undo 00035 class MITK_CORE_EXPORT PointOperation : public Operation 00036 { 00037 public: 00038 //##Documentation 00039 //##@brief Operation that handles all actions on one Point. 00040 //## 00041 //## @param operationType is the type of the operation (see mitkOperation.h; e.g. move or add; Information for StateMachine::ExecuteOperation()); 00042 //## @param point is the information of the point to add or is the information to change a point into 00043 //## @param index is e.g. the position in a list which describes the element to change 00044 PointOperation(OperationType operationType, Point3D point, int index = -1, bool selected = true, PointSpecificationType type = PTUNDEFINED); 00045 00046 //##Documentation 00047 //##@brief Operation that handles all actions on one Point. 00048 //## 00049 //## @param operationType is the type of the operation (see mitkOperation.h; e.g. move or add; Information for StateMachine::ExecuteOperation()); 00050 //## @param point is the information of the point to add or is the information to change a point into 00051 //## @param index is e.g. the position in a list which describes the element to change 00052 PointOperation(OperationType operationType, ScalarType timeInMS, Point3D point, int index = -1, bool selected = true, PointSpecificationType type = PTUNDEFINED); 00053 00054 PointOperation(OperationType operationType, Point3D point, ScalarType timeInMS, int index, bool selected, PointSpecificationType type); 00055 00056 virtual ~PointOperation(); 00057 00058 Point3D GetPoint(); 00059 00060 int GetIndex(); 00061 00062 bool GetSelected(); 00063 00064 PointSpecificationType GetPointType(); 00065 00066 ScalarType GetTimeInMS() const; 00067 00068 private: 00069 Point3D m_Point; 00070 00071 //##Documentation 00072 //##@brief to declare an index where to store the point in data 00073 int m_Index; 00074 00075 //to declare weather the point is selected or deselected 00076 bool m_Selected; 00077 00078 //##Documentation 00079 //##@brief to describe the type of the point. See enum PointSpecification for different types 00080 PointSpecificationType m_Type; 00081 00082 ScalarType m_TimeInMS; 00083 }; 00084 }//namespace mitk 00085 #endif /* MITKPOINTOPERATION_H*/ 00086 00087