Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkLabeledImageToSurfaceFilter.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 _mitk_labeled_image_to_surface_filter__h_
18 #define _mitk_labeled_image_to_surface_filter__h_
19 
21 #include <map>
23 #include <vtkImageData.h>
24 
25 namespace mitk
26 {
39  {
40  public:
42 
43  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
44 
45  typedef int LabelType;
46 
47  typedef std::map<LabelType, unsigned long> LabelMapType;
48 
49  typedef std::map<unsigned int, LabelType> IdxToLabelMapType;
50 
56  itkSetMacro(GenerateAllLabels, bool);
57 
62  itkGetMacro(GenerateAllLabels, bool);
63 
64  itkBooleanMacro(GenerateAllLabels);
65 
71  itkSetMacro(Label, LabelType);
72 
78  itkGetMacro(Label, LabelType);
79 
84  itkSetMacro(BackgroundLabel, LabelType);
85 
90  itkGetMacro(BackgroundLabel, LabelType);
91 
96  itkSetMacro(GaussianStandardDeviation, double);
97 
102  itkGetMacro(GaussianStandardDeviation, double);
103 
112  LabelType GetLabelForNthOutput(const unsigned int &i);
113 
120  mitk::ScalarType GetVolumeForNthOutput(const unsigned int &i);
121 
130  mitk::ScalarType GetVolumeForLabel(const LabelType &label);
131 
132  protected:
133  double m_GaussianStandardDeviation;
134 
135  bool m_GenerateAllLabels;
136 
137  LabelType m_Label;
138 
139  LabelType m_BackgroundLabel;
140 
141  LabelMapType m_AvailableLabels;
142 
143  IdxToLabelMapType m_IdxToLabels;
144 
145  virtual void GenerateData() override;
146 
147  virtual void GenerateOutputInformation() override;
148 
149  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label);
150 
151  virtual LabelMapType GetAvailableLabels();
152 
154 
155  virtual ~LabeledImageToSurfaceFilter();
156 
157  private:
158  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold);
159  };
160 
161 } // end of namespace mitk
162 
163 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
double ScalarType
Superclass of all classes generating some kind of mitk::BaseData.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:35
#define MITKALGORITHMSEXT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Converts pixel data to surface data by using a threshold The mitkImageToSurfaceFilter is used to crea...
std::map< LabelType, unsigned long > LabelMapType
std::map< unsigned int, LabelType > IdxToLabelMapType