Medical Imaging Interaction Toolkit  2026.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 
36  class MITKPLANARFIGURE_EXPORT ExtrudePlanarFigureFilter : public itk::ProcessObject
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42  itkGetMacro(Length, ScalarType);
43  itkSetMacro(Length, ScalarType);
44 
45  itkGetMacro(NumberOfSegments, unsigned int);
46  itkSetMacro(NumberOfSegments, unsigned int);
47 
48  itkGetMacro(TwistAngle, ScalarType);
49  itkSetMacro(TwistAngle, ScalarType);
50 
51  itkGetMacro(BendAngle, ScalarType);
52  itkSetClampMacro(BendAngle, ScalarType, -360, 360);
53 
54  itkGetMacro(BendDirection, Vector2D);
55  itkSetMacro(BendDirection, Vector2D);
56 
57  itkGetMacro(FlipDirection, bool);
58  itkSetMacro(FlipDirection, bool);
59 
60  itkGetMacro(FlipNormals, bool);
61  itkSetMacro(FlipNormals, bool);
62 
63  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
64  DataObjectPointer MakeOutput(const DataObjectIdentifierType &name) override;
65 
66  using Superclass::SetInput;
67  void SetInput(mitk::PlanarFigure *planarFigure);
68 
69  using Superclass::GetOutput;
71 
72  protected:
75 
76  void GenerateData() override;
77  void GenerateOutputInformation() override;
78  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
79 
80  private:
81  ScalarType m_Length;
82  unsigned int m_NumberOfSegments;
83  ScalarType m_TwistAngle;
84  ScalarType m_BendAngle;
85  Vector2D m_BendDirection;
86  bool m_FlipDirection;
87  bool m_FlipNormals;
88  };
89 }
90 
91 #endif
#define MITKPLANARFIGURE_EXPORT
Extrude a planar figure along its normal to produce a 3D surface.
void SetInput(mitk::PlanarFigure *planarFigure)
mitkClassMacroItkParent(ExtrudePlanarFigureFilter, itk::ProcessObject)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
DataObjectPointer MakeOutput(const DataObjectIdentifierType &name) override
void GenerateOutputInformation() override
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Data class for storing polygonal surfaces (vtkPolyData).
Definition: mitkSurface.h:37
Find image slices visible on a given plane.
double ScalarType
Scalar type used throughout MITK for geometric computations.