Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkBoundingShapeUtil.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkBoundingShapeUtil_h
18 #define mitkBoundingShapeUtil_h
19 
20 #include <mitkBaseData.h>
21 #include <mitkBaseGeometry.h>
22 #include <mitkInteractionConst.h>
23 
24 namespace mitk
25 {
29  std::vector<mitk::Point3D> GetCornerPoints(mitk::BaseGeometry::Pointer geometry, bool visualizationOffset);
30 
35 
36  std::vector<int> GetHandleIndices(int index);
37 
42  class Handle final
43  {
44  public:
45  Handle();
46  Handle(mitk::Point3D pos, int index, std::vector<int> faceIndices, bool active = false);
47 
48  ~Handle();
49 
50  bool IsActive();
51  bool IsNotActive();
52  void SetActive(bool status);
53  void SetIndex(int index);
54  int GetIndex();
55  std::vector<int> GetFaceIndices();
56  void SetPosition(mitk::Point3D pos);
58 
59  private:
60  bool m_IsActive;
61  mitk::Point3D m_Position;
62  std::vector<int> m_FaceIndices;
63  int m_Index;
64  };
65 }
66 
67 #endif
DataCollection - Class to facilitate loading/accessing structured data.
Helper Class for realizing the handles of bounding object encapsulated by a geometry data...
Constants for most interaction classes, due to the generic StateMachines.
std::vector< mitk::Point3D > GetCornerPoints(mitk::BaseGeometry::Pointer geometry, bool visualizationOffset)
helper function for calculating corner points of the bounding object from a given geometry ...
std::vector< int > GetHandleIndices(int index)
mitk::Point3D GetPosition()
void SetPosition(mitk::Point3D pos)
std::vector< int > GetFaceIndices()
void SetActive(bool status)
void SetIndex(int index)
mitk::Point3D CalcAvgPoint(mitk::Point3D a, mitk::Point3D b)
helper function for calculating the average of two points