Medical Imaging Interaction Toolkit  2021.02.99-4e0dbe47
Medical Imaging Interaction Toolkit
mitkSurfaceBasedInterpolationController.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 mitkSurfaceBasedInterpolationController_h_Included
14 #define mitkSurfaceBasedInterpolationController_h_Included
15 
16 //#include "mitkCommon.h"
17 #include "mitkContourModel.h"
19 #include "mitkSurface.h"
21 
24 
25 #include "mitkProgressBar.h"
26 
27 namespace mitk
28 {
29  class RestorePlanePositionOperation;
30 
32  {
33  public:
35  itkFactorylessNewMacro(Self);
36  itkCloneMacro(Self);
37 
38  static SurfaceBasedInterpolationController *GetInstance();
39 
43  void AddNewContour(ContourModel::Pointer newContour, RestorePlanePositionOperation *op);
44 
48  void Interpolate();
49 
53  mitk::Surface::Pointer GetInterpolationResult();
54 
59  void SetMinSpacing(double minSpacing);
60 
65  void SetMaxSpacing(double maxSpacing);
66 
71  void SetDistanceImageVolume(unsigned int value);
72 
78  void SetWorkingImage(Image *workingImage);
79 
83  Surface *GetContoursAsSurface();
84 
89  void SetActiveLabel(int activeLabel);
90 
91  mitk::Image *GetImage();
92 
97  double EstimatePortionOfNeededMemory();
98 
99  protected:
101 
103 
104  void Initialize();
105 
106  private:
107  // void OnSegmentationDeleted(const itk::Object *caller, const itk::EventObject &event);
108  /*
109  struct ContourPositionPair {
110  ContourModel::Pointer contour;
111  RestorePlanePositionOperation* position;
112  };
113  */
114  typedef std::pair<ContourModel::Pointer, RestorePlanePositionOperation *> ContourPositionPair;
115  typedef std::vector<ContourPositionPair> ContourPositionPairList;
116  typedef std::map<unsigned int, ContourPositionPairList> ContourListMap;
117 
118  // ReduceContourSetFilter::Pointer m_ReduceFilter;
119  // ComputeContourSetNormalsFilter::Pointer m_NormalsFilter;
120  CreateDistanceImageFromSurfaceFilter::Pointer m_InterpolateSurfaceFilter;
121 
122  double m_MinSpacing;
123  double m_MaxSpacing;
124 
125  unsigned int m_DistanceImageVolume;
126 
127  Image *m_WorkingImage;
128 
129  Surface::Pointer m_Contours;
130 
131  // vtkSmartPointer<vtkPolyData> m_PolyData;
132 
133  ContourListMap m_MapOfContourLists;
134 
135  mitk::Surface::Pointer m_InterpolationResult;
136 
137  // unsigned int m_CurrentNumberOfReducedContours;
138 
139  int m_ActiveLabel;
140 
141  // std::map<mitk::Image*, unsigned long> m_SegmentationObserverTags;
142  };
143 }
144 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKSURFACEINTERPOLATION_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Image class for storing images.
Definition: mitkImage.h:73
itk::SmartPointer< Self > Pointer