Medical Imaging Interaction Toolkit  2018.4.99-93926fb8
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkBoundingShapeUtil_h
14 #define mitkBoundingShapeUtil_h
15 
16 #include <mitkBaseData.h>
17 #include <mitkBaseGeometry.h>
18 #include <mitkInteractionConst.h>
19 
20 namespace mitk
21 {
25  std::vector<mitk::Point3D> GetCornerPoints(mitk::BaseGeometry::Pointer geometry, bool visualizationOffset);
26 
31 
32  std::vector<int> GetHandleIndices(int index);
33 
38  class Handle final
39  {
40  public:
41  Handle();
42  Handle(mitk::Point3D pos, int index, std::vector<int> faceIndices, bool active = false);
43 
44  ~Handle();
45 
46  bool IsActive();
47  bool IsNotActive();
48  void SetActive(bool status);
49  void SetIndex(int index);
50  int GetIndex();
51  std::vector<int> GetFaceIndices();
52  void SetPosition(mitk::Point3D pos);
54 
55  private:
56  bool m_IsActive;
57  mitk::Point3D m_Position;
58  std::vector<int> m_FaceIndices;
59  int m_Index;
60  };
61 }
62 
63 #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