Medical Imaging Interaction Toolkit  2016.11.0
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,
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 _MITK_CONTOUR_H_
18 #define _MITK_CONTOUR_H_
19 
20 #include "mitkBaseData.h"
21 #include "mitkCommon.h"
23 #include <vtkRenderWindow.h>
24 
25 #include <itkPolyLineParametricPath.h>
26 
27 namespace mitk
28 {
36  {
37  public:
39 
40  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
41 
42  typedef itk::PolyLineParametricPath<3> PathType;
43  typedef PathType::Pointer PathPointer;
45  typedef PathType::InputType InputType;
46  typedef PathType::OutputType OutputType;
47  typedef PathType::OffsetType OffsetType;
48  typedef itk::
49  BoundingBox<unsigned long, 3, ScalarType, itk::VectorContainer<unsigned long, mitk::Point<ScalarType, 3>>>
52  typedef BoundingBoxType::PointsContainer::Pointer PointsContainerPointer;
54 
59  itkSetMacro(Closed, bool);
60 
64  itkGetMacro(Closed, bool);
65 
66  itkSetMacro(Selected, bool);
67 
68  itkGetMacro(Selected, bool);
69 
70  itkSetMacro(Width, float);
71 
72  itkGetMacro(Width, float);
73 
77  void Initialize() override;
78 
82  void AddVertex(mitk::Point3D newPoint);
83 
87  PathPointer GetContourPath() const;
88 
93  void SetCurrentWindow(vtkRenderWindow *rw);
94 
98  vtkRenderWindow *GetCurrentWindow() const;
99 
103  unsigned int GetNumberOfPoints() const;
104 
108  PointsContainerPointer GetPoints() const;
109 
113  void SetPoints(PointsContainerPointer points);
114 
118  virtual void UpdateOutputInformation() override;
119 
123  virtual void SetRequestedRegionToLargestPossibleRegion() override;
124 
128  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
129 
133  virtual bool VerifyRequestedRegion() override;
134 
138  virtual void SetRequestedRegion(const itk::DataObject *data) override;
139 
140  protected:
142 
143  Contour();
144  Contour(const Contour &other);
145  virtual ~Contour();
146 
147  virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override;
148 
149  private:
153  PathType::Pointer m_ContourPath;
154 
158  vtkRenderWindow *m_CurrentWindow;
159 
163  BoundingBoxType::Pointer m_BoundingBox;
164 
168  BoundingBoxType::PointsContainer::Pointer m_Vertices;
169 
173  bool m_Closed;
174 
175  bool m_Selected;
176 
177  float m_Width;
178  };
179 
180 } // namespace mitk
181 
182 #endif //_MITK_CONTOUR_H_
itk::BoundingBox< unsigned long, 3, ScalarType > BoundingBox
Standard 3D-BoundingBox typedef.
BoundingBoxType::PointsContainerIterator PointsContainerIterator
Definition: mitkContour.h:53
Base of all data objects.
Definition: mitkBaseData.h:39
double ScalarType
STL namespace.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
PathType::OffsetType OffsetType
Definition: mitkContour.h:47
itk::PolyLineParametricPath< 3 > PathType
Definition: mitkContour.h:42
PathType::ContinuousIndexType ContinuousIndexType
Definition: mitkContour.h:44
Stores vertices for drawing a contour.
Definition: mitkContour.h:35
itk::BoundingBox< unsigned long, 3, ScalarType, itk::VectorContainer< unsigned long, mitk::Point< ScalarType, 3 > > > BoundingBoxType
Definition: mitkContour.h:50
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
PathType::OutputType OutputType
Definition: mitkContour.h:46
PathType::InputType InputType
Definition: mitkContour.h:45
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
Definition: mitkContour.h:52
PathType::Pointer PathPointer
Definition: mitkContour.h:43
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:162
BoundingBoxType::PointsContainer PointsContainer
Definition: mitkContour.h:51