Medical Imaging Interaction Toolkit  2021.10.00
Medical Imaging Interaction Toolkit
mitkImageToContourFilter.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 mitkImageToContourFilter_h_Included
14 #define mitkImageToContourFilter_h_Included
15 
16 //#include "MitkSBExports.h"
18 #include "itkImage.h"
19 #include "mitkImage.h"
21 #include "mitkSurface.h"
22 #include "vtkCellArray.h"
23 #include "vtkPolyData.h"
24 #include "vtkPolygon.h"
26 
27 #include "mitkProgressBar.h"
28 
29 namespace mitk
30 {
42  {
43  public:
45  itkFactorylessNewMacro(Self);
46  itkCloneMacro(Self);
47 
54  itkSetMacro(SliceGeometry, BaseGeometry *);
55 
56  // typedef unsigned int VDimension;
57  typedef itk::PolyLineParametricPath<2> PolyLineParametricPath2D;
58  typedef PolyLineParametricPath2D::VertexListType ContourPath;
59 
65  void SetUseProgressBar(bool);
66 
72  void SetProgressStepSize(unsigned int stepSize);
73 
74  protected:
76  ~ImageToContourFilter() override;
77  void GenerateData() override;
78  void GenerateOutputInformation() override;
79 
80  private:
81  const BaseGeometry *m_SliceGeometry;
82  bool m_UseProgressBar;
83  unsigned int m_ProgressStepSize;
84 
85  template <typename TPixel, unsigned int VImageDimension>
86  void Itk2DContourExtraction(const itk::Image<TPixel, VImageDimension> *sliceImage);
87 
88  }; // class
89 
90 } // namespace
91 #endif
Superclass of all classes generating some kind of mitk::BaseData.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
PolyLineParametricPath2D::VertexListType ContourPath
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Converts pixel data to surface data by using a threshold The mitkImageToSurfaceFilter is used to crea...
itk::PolyLineParametricPath< 2 > PolyLineParametricPath2D
BaseGeometry Describes the geometry of a data object.
A filter that can extract contours out of a 2D binary image.