Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkExtrudePlanarFigureFilter.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 mitkExtrudePlanarFigureFilter_h
14 #define mitkExtrudePlanarFigureFilter_h
15 
17 #include <itkProcessObject.h>
18 #include <mitkCommon.h>
19 #include <mitkVector.h>
20 
21 namespace mitk
22 {
23  class PlanarFigure;
24  class Surface;
25 
26  class MITKPLANARFIGURE_EXPORT ExtrudePlanarFigureFilter : public itk::ProcessObject
27  {
28  public:
30  itkFactorylessNewMacro(Self);
31  itkCloneMacro(Self);
32  itkGetMacro(Length, ScalarType);
33  itkSetMacro(Length, ScalarType);
34 
35  itkGetMacro(NumberOfSegments, unsigned int);
36  itkSetMacro(NumberOfSegments, unsigned int);
37 
38  itkGetMacro(TwistAngle, ScalarType);
39  itkSetMacro(TwistAngle, ScalarType);
40 
41  itkGetMacro(BendAngle, ScalarType);
42  itkSetClampMacro(BendAngle, ScalarType, -360, 360);
43 
44  itkGetMacro(BendDirection, Vector2D);
45  mitkSetConstReferenceMacro(BendDirection, Vector2D);
46 
47  itkGetMacro(FlipDirection, bool);
48  itkSetMacro(FlipDirection, bool);
49 
50  itkGetMacro(FlipNormals, bool);
51  itkSetMacro(FlipNormals, bool);
52 
53  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
54  DataObjectPointer MakeOutput(const DataObjectIdentifierType &name) override;
55 
56  using Superclass::SetInput;
57  void SetInput(mitk::PlanarFigure *planarFigure);
58 
59  using Superclass::GetOutput;
60  mitk::Surface *GetOutput();
61 
62  protected:
64  ~ExtrudePlanarFigureFilter() override;
65 
66  void GenerateData() override;
67  void GenerateOutputInformation() override;
68  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
69 
70  private:
71  ScalarType m_Length;
72  unsigned int m_NumberOfSegments;
73  ScalarType m_TwistAngle;
74  ScalarType m_BendAngle;
75  Vector2D m_BendDirection;
76  bool m_FlipDirection;
77  bool m_FlipNormals;
78  };
79 }
80 
81 #endif
MitkPlanarFigureExports.h
mitk::PlanarFigure
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Definition: mitkPlanarFigure.h:50
MITKPLANARFIGURE_EXPORT
#define MITKPLANARFIGURE_EXPORT
Definition: MitkPlanarFigureExports.h:15
mitk::Surface
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ExtrudePlanarFigureFilter
Definition: mitkExtrudePlanarFigureFilter.h:26
mitk::Vector< ScalarType, 2 >
mitkSetConstReferenceMacro
#define mitkSetConstReferenceMacro(name, type)
Definition: mitkVectorDeprecated.h:259
mitkCommon.h
mitkVector.h
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20