Medical Imaging Interaction Toolkit  2021.02.99-4e0dbe47
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 // MITKPLANEPROPOSER_H
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKSURFACEINTERPOLATION_EXPORT
Encapsulates the geometrical information needed to descripe a PlaneInfo.
The PlaneProposer creates a new plane based on an input point cloud.