Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkPlaneProposer.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 mitkPlaneProposer_h
14 #define mitkPlaneProposer_h
15 
17 
18 #include <mitkPoint.h>
19 #include <mitkVector.h>
20 
21 #include <itkSmartPointer.h>
22 
23 #include <array>
24 #include <vector>
25 
26 #include <mitkDataStorage.h>
27 
28 namespace mitk
29 {
30  class SliceNavigationController;
31  class UnstructuredGrid;
32 
49  {
50  public:
57  struct PlaneInfo
58  {
63  };
64 
65  PlaneProposer();
66  ~PlaneProposer();
67 
68  void SetUnstructuredGrids(std::vector<itk::SmartPointer<mitk::UnstructuredGrid>> &grids);
69 
74  void SetUseDistances(bool);
75 
81  void SetUseLeastSquares(bool);
82 
86  void SetNumberOfClustersToUse(unsigned int);
87  void SetSliceNavigationController(itk::SmartPointer<mitk::SliceNavigationController> &snc);
88 
96  void CreatePlaneInfo();
97 
98  PlaneInfo GetProposedPlaneInfo();
99 
100  std::array<std::array<double, 3>, 3> GetCentroids();
101 
102  private:
103  PlaneProposer(const PlaneProposer &); // not implemented on purpose
104  PlaneProposer &operator=(const PlaneProposer &); // not implemented on purpose
105 
109  PlaneInfo CreatePlaneByCentroids(const std::vector<std::pair<int, int>> &sizeIDs,
110  const std::vector<std::pair<double, int>> &avgDistances);
111 
115  PlaneInfo CreatePlaneByLeastSquares(const std::vector<std::pair<int, int>> &sizeIDs,
116  const std::vector<std::pair<double, int>> &avgDistances);
117 
118  std::vector<itk::SmartPointer<mitk::UnstructuredGrid>> m_Grids;
119  bool m_UseDistances;
120  bool m_UseLeastSquares;
121  unsigned int m_NumberOfClustersToUse;
122  std::array<std::array<double, 3>, 3> m_Centroids;
124  PlaneInfo m_ProposedPlaneInfo;
125  };
126 
127 } // namespace
128 
129 #endif
mitkDataStorage.h
MITKSURFACEINTERPOLATION_EXPORT
#define MITKSURFACEINTERPOLATION_EXPORT
Definition: MitkSurfaceInterpolationExports.h:15
mitkPoint.h
itk::SmartPointer< mitk::UnstructuredGrid >
mitk::PlaneProposer::PlaneInfo::y
mitk::Vector3D y
Definition: mitkPlaneProposer.h:61
mitk::PlaneProposer::PlaneInfo::x
mitk::Vector3D x
Definition: mitkPlaneProposer.h:60
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Vector< ScalarType, 3 >
mitk::Point< ScalarType, 3 >
mitk::PlaneProposer::PlaneInfo
Encapsulates the geometrical information needed to descripe a PlaneInfo.
Definition: mitkPlaneProposer.h:57
mitk::PlaneProposer::PlaneInfo::normal
mitk::Vector3D normal
Definition: mitkPlaneProposer.h:59
mitk::PlaneProposer::PlaneInfo::pointOnPlane
mitk::Point3D pointOnPlane
Definition: mitkPlaneProposer.h:62
MitkSurfaceInterpolationExports.h
mitkVector.h
mitk::PlaneProposer
The PlaneProposer creates a new plane based on an input point cloud.
Definition: mitkPlaneProposer.h:48