Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkComputeContourSetNormalsFilter.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 mitkComputeContourSetNormalsFilter_h_Included
18 #define mitkComputeContourSetNormalsFilter_h_Included
19 
20 #include "mitkProgressBar.h"
21 #include "mitkSurface.h"
24 
25 #include "vtkCellArray.h"
26 #include "vtkCellData.h"
27 #include "vtkDoubleArray.h"
28 #include "vtkLine.h"
29 #include "vtkMath.h"
30 #include "vtkPolyData.h"
31 #include "vtkSmartPointer.h"
32 
33 #include "mitkImage.h"
34 
35 namespace mitk
36 {
55  {
56  public:
58  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
59 
60  /*
61  \brief Returns the computed normals as a surface
62  */
63  mitk::Surface::Pointer GetNormalsAsSurface();
64 
65  // Resets the filter, i.e. removes all inputs and outputs
66  void Reset();
67 
68  void SetMaxSpacing(double);
69 
75  void SetUseProgressBar(bool);
76 
82  void SetProgressStepSize(unsigned int stepSize);
83 
84  void SetSegmentationBinaryImage(mitk::Image *segmentationImage) { m_SegmentationBinaryImage = segmentationImage; }
85  protected:
88  virtual void GenerateData() override;
89  virtual void GenerateOutputInformation() override;
90 
91  private:
92  // The segmentation out of which the contours were extracted. Can be used to determine the direction of the normals
93  mitk::Image::Pointer m_SegmentationBinaryImage;
94  double m_MaxSpacing;
95 
96  unsigned int m_NegativeNormalCounter;
97  unsigned int m_PositiveNormalCounter;
98 
99  bool m_UseProgressBar;
100  unsigned int m_ProgressStepSize;
101 
102  }; // class
103 
104 } // namespace
105 #endif
void SetSegmentationBinaryImage(mitk::Image *segmentationImage)
Filter to compute the normales for contours based on vtkPolygons.
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKSURFACEINTERPOLATION_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Image class for storing images.
Definition: mitkImage.h:76
Superclass of all classes getting surfaces (instances of class Surface) as input and generating surfa...