Medical Imaging Interaction Toolkit  2023.12.99-63768887
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
mitk::Handle::Handle
Handle()
mitkInteractionConst.h
Constants for most interaction classes, due to the generic StateMachines.
mitk::GetHandleIndices
std::vector< int > GetHandleIndices(int index)
itk::SmartPointer< Self >
mitk::Handle::SetActive
void SetActive(bool status)
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Handle::IsActive
bool IsActive()
mitk::Handle::GetIndex
int GetIndex()
mitk::Handle::SetIndex
void SetIndex(int index)
mitk::GetCornerPoints
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
mitk::Point< ScalarType, 3 >
mitk::CalcAvgPoint
mitk::Point3D CalcAvgPoint(mitk::Point3D a, mitk::Point3D b)
helper function for calculating the average of two points
mitk::Handle::~Handle
~Handle()
mitk::Handle::IsNotActive
bool IsNotActive()
mitk::Handle
Helper Class for realizing the handles of bounding object encapsulated by a geometry data.
Definition: mitkBoundingShapeUtil.h:38
mitk::Handle::SetPosition
void SetPosition(mitk::Point3D pos)
mitkBaseGeometry.h
mitkBaseData.h
mitk::Handle::GetFaceIndices
std::vector< int > GetFaceIndices()
mitk::Handle::GetPosition
mitk::Point3D GetPosition()