Medical Imaging Interaction Toolkit  2016.11.0
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,
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 mitkImageToContourFilter_h_Included
18 #define mitkImageToContourFilter_h_Included
19 
20 //#include "MitkSBExports.h"
22 #include "itkImage.h"
23 #include "mitkImage.h"
25 #include "mitkSurface.h"
26 #include "vtkCellArray.h"
27 #include "vtkPolyData.h"
28 #include "vtkPolygon.h"
30 
31 #include "mitkProgressBar.h"
32 
33 namespace mitk
34 {
46  {
47  public:
49  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
50 
51 
57  itkSetMacro(SliceGeometry, BaseGeometry *);
58 
59  // typedef unsigned int VDimension;
60  typedef itk::PolyLineParametricPath<2> PolyLineParametricPath2D;
61  typedef PolyLineParametricPath2D::VertexListType ContourPath;
62 
68  void SetUseProgressBar(bool);
69 
75  void SetProgressStepSize(unsigned int stepSize);
76 
77  protected:
79  virtual ~ImageToContourFilter();
80  virtual void GenerateData() override;
81  virtual void GenerateOutputInformation() override;
82 
83  private:
84  const BaseGeometry *m_SliceGeometry;
85  bool m_UseProgressBar;
86  unsigned int m_ProgressStepSize;
87 
88  template <typename TPixel, unsigned int VImageDimension>
89  void Itk2DContourExtraction(const itk::Image<TPixel, VImageDimension> *sliceImage);
90 
91  }; // class
92 
93 } // namespace
94 #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:44
Image class for storing images.
Definition: mitkImage.h:76
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.