Medical Imaging Interaction Toolkit  2023.12.99-7a59bd54
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 mitkContour_h
14 #define mitkContour_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::PointsContainerPointer
BoundingBoxType::PointsContainer::Pointer PointsContainerPointer
Definition: mitkContour.h:50
mitk::Contour::OffsetType
PathType::OffsetType OffsetType
Definition: mitkContour.h:45
mitk::Contour::PointsContainer
BoundingBoxType::PointsContainer PointsContainer
Definition: mitkContour.h:49
mitk::Contour::OutputType
PathType::OutputType OutputType
Definition: mitkContour.h:44
mitk::Contour::PointsContainerIterator
BoundingBoxType::PointsContainerIterator PointsContainerIterator
Definition: mitkContour.h:51
mitk::Contour::ContinuousIndexType
PathType::ContinuousIndexType ContinuousIndexType
Definition: mitkContour.h:42
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Point< ScalarType, 3 >
mitk::Contour::PathType
itk::PolyLineParametricPath< 3 > PathType
Definition: mitkContour.h:38
mitk::Contour::PathPointer
PathType::Pointer PathPointer
Definition: mitkContour.h:41
mitkCommon.h
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitk::Contour::InputType
PathType::InputType InputType
Definition: mitkContour.h:43
mitk::Contour::BoundingBoxType
itk::BoundingBox< unsigned long, 3, ScalarType, itk::VectorContainer< unsigned long, mitk::Point< ScalarType, 3 > > > BoundingBoxType
Definition: mitkContour.h:48
mitkBaseData.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MitkSegmentationExports.h
mitk::Contour
Stores vertices for drawing a contour.
Definition: mitkContour.h:31