Medical Imaging Interaction Toolkit  2025.12.02
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 
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();
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
Helper Class for realizing the handles of bounding object encapsulated by a geometry data.
void SetActive(bool status)
std::vector< int > GetFaceIndices()
bool IsActive()
void SetPosition(mitk::Point3D pos)
mitk::Point3D GetPosition()
void SetIndex(int index)
Handle(mitk::Point3D pos, int index, std::vector< int > faceIndices, bool active=false)
bool IsNotActive()
Constants for most interaction classes, due to the generic StateMachines.
Find image slices visible on a given plane.
mitk::Point3D CalcAvgPoint(mitk::Point3D a, mitk::Point3D b)
helper function for calculating the average of two points
std::vector< int > GetHandleIndices(int index)
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