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