Medical Imaging Interaction Toolkit  2018.4.99-e1268d66
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 (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 mitkComputeContourSetNormalsFilter_h_Included
14 #define mitkComputeContourSetNormalsFilter_h_Included
15 
16 #include "mitkProgressBar.h"
17 #include "mitkSurface.h"
20 
21 #include "vtkCellArray.h"
22 #include "vtkCellData.h"
23 #include "vtkDoubleArray.h"
24 #include "vtkLine.h"
25 #include "vtkMath.h"
26 #include "vtkPolyData.h"
27 #include "vtkSmartPointer.h"
28 
29 #include "mitkImage.h"
30 
31 namespace mitk
32 {
51  {
52  public:
54  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
55 
56  /*
57  \brief Returns the computed normals as a surface
58  */
59  mitk::Surface::Pointer GetNormalsAsSurface();
60 
61  // Resets the filter, i.e. removes all inputs and outputs
62  void Reset();
63 
64  void SetMaxSpacing(double);
65 
71  void SetUseProgressBar(bool);
72 
78  void SetProgressStepSize(unsigned int stepSize);
79 
80  void SetSegmentationBinaryImage(mitk::Image *segmentationImage) { m_SegmentationBinaryImage = segmentationImage; }
81  protected:
84  void GenerateData() override;
85  void GenerateOutputInformation() override;
86 
87  private:
88  // The segmentation out of which the contours were extracted. Can be used to determine the direction of the normals
89  mitk::Image::Pointer m_SegmentationBinaryImage;
90  double m_MaxSpacing;
91 
92  unsigned int m_NegativeNormalCounter;
93  unsigned int m_PositiveNormalCounter;
94 
95  bool m_UseProgressBar;
96  unsigned int m_ProgressStepSize;
97 
98  }; // class
99 
100 } // namespace
101 #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:40
Image class for storing images.
Definition: mitkImage.h:72
Superclass of all classes getting surfaces (instances of class Surface) as input and generating surfa...