Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKPLANEPROPOSER_H
18 #define MITKPLANEPROPOSER_H
19 
21 
22 #include <mitkPoint.h>
23 #include <mitkVector.h>
24 
25 #include <itkSmartPointer.h>
26 
27 #include <array>
28 #include <vector>
29 
30 #include <mitkDataStorage.h>
31 
32 namespace mitk
33 {
34  class SliceNavigationController;
35  class UnstructuredGrid;
36 
53  {
54  public:
61  struct PlaneInfo
62  {
67  };
68 
69  PlaneProposer();
70  ~PlaneProposer();
71 
72  void SetUnstructuredGrids(std::vector<itk::SmartPointer<mitk::UnstructuredGrid>> &grids);
73 
78  void SetUseDistances(bool);
79 
85  void SetUseLeastSquares(bool);
86 
90  void SetNumberOfClustersToUse(unsigned int);
91  void SetSliceNavigationController(itk::SmartPointer<mitk::SliceNavigationController> &snc);
92 
100  void CreatePlaneInfo();
101 
102  PlaneInfo GetProposedPlaneInfo();
103 
104  std::array<std::array<double, 3>, 3> GetCentroids();
105 
106  private:
107  PlaneProposer(const PlaneProposer &); // not implemented on purpose
108  PlaneProposer &operator=(const PlaneProposer &); // not implemented on purpose
109 
113  PlaneInfo CreatePlaneByCentroids(const std::vector<std::pair<int, int>> &sizeIDs,
114  const std::vector<std::pair<double, int>> &avgDistances);
115 
119  PlaneInfo CreatePlaneByLeastSquares(const std::vector<std::pair<int, int>> &sizeIDs,
120  const std::vector<std::pair<double, int>> &avgDistances);
121 
122  std::vector<itk::SmartPointer<mitk::UnstructuredGrid>> m_Grids;
123  bool m_UseDistances;
124  bool m_UseLeastSquares;
125  unsigned int m_NumberOfClustersToUse;
126  std::array<std::array<double, 3>, 3> m_Centroids;
128  PlaneInfo m_ProposedPlaneInfo;
129  };
130 
131 } // namespace
132 
133 #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.