Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
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);
37 
38  itkCloneMacro(Self);
39 
40  typedef itk::PolyLineParametricPath<3> PathType;
41  typedef PathType::Pointer PathPointer;
42  typedef PathType::ContinuousIndexType ContinuousIndexType;
43  typedef PathType::InputType InputType;
44  typedef PathType::OutputType OutputType;
45  typedef PathType::OffsetType OffsetType;
46  typedef itk::
47  BoundingBox<unsigned long, 3, ScalarType, itk::VectorContainer<unsigned long, mitk::Point<ScalarType, 3>>>
49  typedef BoundingBoxType::PointsContainer PointsContainer;
50  typedef BoundingBoxType::PointsContainer::Pointer PointsContainerPointer;
51  typedef BoundingBoxType::PointsContainerIterator PointsContainerIterator;
52 
57  itkSetMacro(Closed, bool);
58 
62  itkGetMacro(Closed, bool);
63 
64  itkSetMacro(Selected, bool);
65 
66  itkGetMacro(Selected, bool);
67 
68  itkSetMacro(Width, float);
69 
70  itkGetMacro(Width, float);
71 
75  void Initialize() override;
76 
80  void AddVertex(mitk::Point3D newPoint);
81 
85  PathPointer GetContourPath() const;
86 
91  void SetCurrentWindow(vtkRenderWindow *rw);
92 
96  vtkRenderWindow *GetCurrentWindow() const;
97 
101  unsigned int GetNumberOfPoints() const;
102 
106  PointsContainerPointer GetPoints() const;
107 
111  void SetPoints(PointsContainerPointer points);
112 
116  void UpdateOutputInformation() override;
117 
121  void SetRequestedRegionToLargestPossibleRegion() override;
122 
126  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
127 
131  bool VerifyRequestedRegion() override;
132 
136  void SetRequestedRegion(const itk::DataObject *data) override;
137 
138  protected:
140 
141  Contour();
142  Contour(const Contour &other);
143  ~Contour() override;
144 
145  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
146 
147  private:
151  PathType::Pointer m_ContourPath;
152 
156  vtkRenderWindow *m_CurrentWindow;
157 
161  BoundingBoxType::Pointer m_BoundingBox;
162 
166  BoundingBoxType::PointsContainer::Pointer m_Vertices;
167 
171  bool m_Closed;
172 
173  bool m_Selected;
174 
175  float m_Width;
176  };
177 
178 } // namespace mitk
179 
180 #endif //_MITK_CONTOUR_H_
BoundingBoxType::PointsContainerIterator PointsContainerIterator
Definition: mitkContour.h:51
Base of all data objects.
Definition: mitkBaseData.h:37
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
PathType::OffsetType OffsetType
Definition: mitkContour.h:45
itk::PolyLineParametricPath< 3 > PathType
Definition: mitkContour.h:38
PathType::ContinuousIndexType ContinuousIndexType
Definition: mitkContour.h:42
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:48
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
PathType::OutputType OutputType
Definition: mitkContour.h:44
PathType::InputType InputType
Definition: mitkContour.h:43
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
Definition: mitkContour.h:50
PathType::Pointer PathPointer
Definition: mitkContour.h:41
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:158
BoundingBoxType::PointsContainer PointsContainer
Definition: mitkContour.h:49