Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
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 (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 _mitk_labeled_image_to_surface_filter__h_
14 #define _mitk_labeled_image_to_surface_filter__h_
15 
17 #include <map>
19 #include <vtkImageData.h>
20 
21 namespace mitk
22 {
35  {
36  public:
38 
39  itkFactorylessNewMacro(Self);
40 
41  itkCloneMacro(Self);
42 
43  typedef int LabelType;
44 
45  typedef std::map<LabelType, unsigned long> LabelMapType;
46 
47  typedef std::map<unsigned int, LabelType> IdxToLabelMapType;
48 
54  itkSetMacro(GenerateAllLabels, bool);
55 
60  itkGetMacro(GenerateAllLabels, bool);
61 
62  itkBooleanMacro(GenerateAllLabels);
63 
69  itkSetMacro(Label, LabelType);
70 
76  itkGetMacro(Label, LabelType);
77 
82  itkSetMacro(BackgroundLabel, LabelType);
83 
88  itkGetMacro(BackgroundLabel, LabelType);
89 
94  itkSetMacro(GaussianStandardDeviation, double);
95 
100  itkGetMacro(GaussianStandardDeviation, double);
101 
110  LabelType GetLabelForNthOutput(const unsigned int &i);
111 
118  mitk::ScalarType GetVolumeForNthOutput(const unsigned int &i);
119 
128  mitk::ScalarType GetVolumeForLabel(const LabelType &label);
129 
130  protected:
132 
134 
135  LabelType m_Label;
136 
137  LabelType m_BackgroundLabel;
138 
139  LabelMapType m_AvailableLabels;
140 
141  IdxToLabelMapType m_IdxToLabels;
142 
143  void GenerateData() override;
144 
145  void GenerateOutputInformation() override;
146 
147  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label);
148 
149  virtual LabelMapType GetAvailableLabels();
150 
152 
153  ~LabeledImageToSurfaceFilter() override;
154 
155  private:
156  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold);
157  };
158 
159 } // end of namespace mitk
160 
161 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
double ScalarType
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:31
#define MITKALGORITHMSEXT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
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