Medical Imaging Interaction Toolkit  2018.4.99-87d68d9f
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);
55  itkCloneMacro(Self);
56 
57  /*
58  \brief Returns the computed normals as a surface
59  */
60  mitk::Surface::Pointer GetNormalsAsSurface();
61 
62  // Resets the filter, i.e. removes all inputs and outputs
63  void Reset();
64 
65  void SetMaxSpacing(double);
66 
72  void SetUseProgressBar(bool);
73 
79  void SetProgressStepSize(unsigned int stepSize);
80 
81  void SetSegmentationBinaryImage(mitk::Image *segmentationImage) { m_SegmentationBinaryImage = segmentationImage; }
82  protected:
85  void GenerateData() override;
86  void GenerateOutputInformation() override;
87 
88  private:
89  // The segmentation out of which the contours were extracted. Can be used to determine the direction of the normals
90  mitk::Image::Pointer m_SegmentationBinaryImage;
91  double m_MaxSpacing;
92 
93  unsigned int m_NegativeNormalCounter;
94  unsigned int m_PositiveNormalCounter;
95 
96  bool m_UseProgressBar;
97  unsigned int m_ProgressStepSize;
98 
99  }; // class
100 
101 } // namespace
102 #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...