Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkContourModelSet.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 #ifndef mitkContourModelSet_h
13 #define mitkContourModelSet_h
14 
15 #include "mitkCommon.h"
17 
18 #include "mitkContourModel.h"
19 
20 #include <deque>
21 
22 namespace mitk
23 {
27  {
28  public:
30 
31  itkFactorylessNewMacro(Self);
32 
33  itkCloneMacro(Self);
34 
35  typedef std::deque<mitk::ContourModel::Pointer> ContourModelListType;
36  typedef ContourModelListType::iterator ContourModelSetIterator;
37 
38  // start of inline methods
39 
42  virtual ContourModelSetIterator Begin() { return this->m_Contours.begin(); }
45  virtual ContourModelSetIterator End() { return this->m_Contours.end(); }
48  virtual int GetSize() const { return this->m_Contours.size(); }
49  // end of inline methods
50 
53  virtual void AddContourModel(mitk::ContourModel &contourModel);
54 
57  virtual void AddContourModel(mitk::ContourModel::Pointer contourModel);
58 
62  virtual mitk::ContourModel *GetContourModelAt(int index) const;
63 
66  ContourModelListType *GetContourModelList();
67 
70  bool IsEmpty() const override;
71 
75  virtual bool RemoveContourModel(mitk::ContourModel *contourModel);
76 
80  virtual bool RemoveContourModelAt(int index);
81 
84  void Clear() override;
85 
87 
88  /* NO support for regions ! */
89 
91  bool RequestedRegionIsOutsideOfTheBufferedRegion() override { return false; }
92  bool VerifyRequestedRegion() override { return true; }
93  void SetRequestedRegion(const itk::DataObject *) override {}
99  void UpdateOutputInformation() override;
100 
102 
103  protected:
104  mitkCloneMacro(Self);
105 
106  ContourModelSet();
108  ~ContourModelSet() override;
109 
110  // inherit from BaseData. Initial state with no contours and a single timestep.
111  void InitializeEmpty() override;
112 
114 
115  // only update the bounding geometry if necessary
117  };
118 } // namespace mitk
119 
120 #endif
mitk::ContourModelSet::RequestedRegionIsOutsideOfTheBufferedRegion
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
Definition: mitkContourModelSet.h:91
mitk::ContourModelSet::SetRequestedRegion
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
Definition: mitkContourModelSet.h:93
mitk::ContourModelSet::m_Contours
ContourModelListType m_Contours
Definition: mitkContourModelSet.h:113
mitk::ContourModelSet::GetSize
virtual int GetSize() const
Returns the number of contained contours.
Definition: mitkContourModelSet.h:48
itk::SmartPointer< Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkContourModel.h
MitkContourModelExports.h
mitk::ContourModelSet::ContourModelListType
std::deque< mitk::ContourModel::Pointer > ContourModelListType
Definition: mitkContourModelSet.h:33
mitk::ContourModelSet::m_UpdateBoundingBox
bool m_UpdateBoundingBox
Definition: mitkContourModelSet.h:116
mitk::ContourModelSet::VerifyRequestedRegion
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
Definition: mitkContourModelSet.h:92
mitk::ContourModel
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Definition: mitkContourModel.h:47
mitkCommon.h
mitk::ContourModelSet::SetRequestedRegionToLargestPossibleRegion
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
Definition: mitkContourModelSet.h:90
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitk::ContourModelSet::End
virtual ContourModelSetIterator End()
Return an iterator a the front.
Definition: mitkContourModelSet.h:45
mitk::ContourModelSet::Begin
virtual ContourModelSetIterator Begin()
Return an iterator a the front.
Definition: mitkContourModelSet.h:42
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MITKCONTOURMODEL_EXPORT
#define MITKCONTOURMODEL_EXPORT
Definition: MitkContourModelExports.h:15
mitk::ContourModelSet
Definition: mitkContourModelSet.h:26
mitk::ContourModelSet::ContourModelSetIterator
ContourModelListType::iterator ContourModelSetIterator
Definition: mitkContourModelSet.h:36