Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkContour.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 _MITK_CONTOUR_H_
14 #define _MITK_CONTOUR_H_
15 
16 #include "mitkBaseData.h"
17 #include "mitkCommon.h"
19 #include <vtkRenderWindow.h>
20 
21 #include <itkPolyLineParametricPath.h>
22 
23 namespace mitk
24 {
32  {
33  public:
35 
36  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
37 
38  typedef itk::PolyLineParametricPath<3> PathType;
39  typedef PathType::Pointer PathPointer;
41  typedef PathType::InputType InputType;
42  typedef PathType::OutputType OutputType;
43  typedef PathType::OffsetType OffsetType;
44  typedef itk::
45  BoundingBox<unsigned long, 3, ScalarType, itk::VectorContainer<unsigned long, mitk::Point<ScalarType, 3>>>
48  typedef BoundingBoxType::PointsContainer::Pointer PointsContainerPointer;
50 
55  itkSetMacro(Closed, bool);
56 
60  itkGetMacro(Closed, bool);
61 
62  itkSetMacro(Selected, bool);
63 
64  itkGetMacro(Selected, bool);
65 
66  itkSetMacro(Width, float);
67 
68  itkGetMacro(Width, float);
69 
73  void Initialize() override;
74 
78  void AddVertex(mitk::Point3D newPoint);
79 
83  PathPointer GetContourPath() const;
84 
89  void SetCurrentWindow(vtkRenderWindow *rw);
90 
94  vtkRenderWindow *GetCurrentWindow() const;
95 
99  unsigned int GetNumberOfPoints() const;
100 
104  PointsContainerPointer GetPoints() const;
105 
109  void SetPoints(PointsContainerPointer points);
110 
114  void UpdateOutputInformation() override;
115 
119  void SetRequestedRegionToLargestPossibleRegion() override;
120 
124  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
125 
129  bool VerifyRequestedRegion() override;
130 
134  void SetRequestedRegion(const itk::DataObject *data) override;
135 
136  protected:
138 
139  Contour();
140  Contour(const Contour &other);
141  ~Contour() override;
142 
143  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
144 
145  private:
149  PathType::Pointer m_ContourPath;
150 
154  vtkRenderWindow *m_CurrentWindow;
155 
159  BoundingBoxType::Pointer m_BoundingBox;
160 
164  BoundingBoxType::PointsContainer::Pointer m_Vertices;
165 
169  bool m_Closed;
170 
171  bool m_Selected;
172 
173  float m_Width;
174  };
175 
176 } // namespace mitk
177 
178 #endif //_MITK_CONTOUR_H_
itk::BoundingBox< unsigned long, 3, ScalarType > BoundingBox
Standard 3D-BoundingBox typedef.
BoundingBoxType::PointsContainerIterator PointsContainerIterator
Definition: mitkContour.h:49
Base of all data objects.
Definition: mitkBaseData.h:37
double ScalarType
STL namespace.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
PathType::OffsetType OffsetType
Definition: mitkContour.h:43
itk::PolyLineParametricPath< 3 > PathType
Definition: mitkContour.h:38
PathType::ContinuousIndexType ContinuousIndexType
Definition: mitkContour.h:40
Stores vertices for drawing a contour.
Definition: mitkContour.h:31
itk::BoundingBox< unsigned long, 3, ScalarType, itk::VectorContainer< unsigned long, mitk::Point< ScalarType, 3 > > > BoundingBoxType
Definition: mitkContour.h:46
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
PathType::OutputType OutputType
Definition: mitkContour.h:42
PathType::InputType InputType
Definition: mitkContour.h:41
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
Definition: mitkContour.h:48
PathType::Pointer PathPointer
Definition: mitkContour.h:39
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:158
BoundingBoxType::PointsContainer PointsContainer
Definition: mitkContour.h:47