Medical Imaging Interaction Toolkit  2016.11.0
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,
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 mitkSurfaceBasedInterpolationController_h_Included
18 #define mitkSurfaceBasedInterpolationController_h_Included
19 
20 //#include "mitkCommon.h"
21 #include "mitkContourModel.h"
23 #include "mitkSurface.h"
25 
28 
29 #include "mitkProgressBar.h"
30 
31 namespace mitk
32 {
33  class RestorePlanePositionOperation;
34 
36  {
37  public:
38  mitkClassMacroItkParent(SurfaceBasedInterpolationController, itk::Object) itkFactorylessNewMacro(Self)
39  itkCloneMacro(Self)
40 
41  static SurfaceBasedInterpolationController *GetInstance();
42 
46  void AddNewContour(ContourModel::Pointer newContour, RestorePlanePositionOperation *op);
47 
51  void Interpolate();
52 
56  mitk::Surface::Pointer GetInterpolationResult();
57 
62  void SetMinSpacing(double minSpacing);
63 
68  void SetMaxSpacing(double maxSpacing);
69 
74  void SetDistanceImageVolume(unsigned int value);
75 
81  void SetWorkingImage(Image *workingImage);
82 
86  Surface *GetContoursAsSurface();
87 
92  void SetActiveLabel(int activeLabel);
93 
94  mitk::Image *GetImage();
95 
100  double EstimatePortionOfNeededMemory();
101 
102  protected:
104 
106 
107  void Initialize();
108 
109  private:
110  // void OnSegmentationDeleted(const itk::Object *caller, const itk::EventObject &event);
111  /*
112  struct ContourPositionPair {
113  ContourModel::Pointer contour;
114  RestorePlanePositionOperation* position;
115  };
116  */
117  typedef std::pair<ContourModel::Pointer, RestorePlanePositionOperation *> ContourPositionPair;
118  typedef std::vector<ContourPositionPair> ContourPositionPairList;
119  typedef std::map<unsigned int, ContourPositionPairList> ContourListMap;
120 
121  // ReduceContourSetFilter::Pointer m_ReduceFilter;
122  // ComputeContourSetNormalsFilter::Pointer m_NormalsFilter;
123  CreateDistanceImageFromSurfaceFilter::Pointer m_InterpolateSurfaceFilter;
124 
125  double m_MinSpacing;
126  double m_MaxSpacing;
127 
128  unsigned int m_DistanceImageVolume;
129 
130  Image *m_WorkingImage;
131 
132  Surface::Pointer m_Contours;
133 
134  // vtkSmartPointer<vtkPolyData> m_PolyData;
135 
136  ContourListMap m_MapOfContourLists;
137 
138  mitk::Surface::Pointer m_InterpolationResult;
139 
140  // unsigned int m_CurrentNumberOfReducedContours;
141 
142  int m_ActiveLabel;
143 
144  // std::map<mitk::Image*, unsigned long> m_SegmentationObserverTags;
145  };
146 }
147 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKSURFACEINTERPOLATION_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
Image class for storing images.
Definition: mitkImage.h:76