Medical Imaging Interaction Toolkit  2018.4.99-1bab67a2
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:
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 
113  ContourModelListType m_Contours;
114 
115  // only update the bounding geometry if necessary
117  };
118 } // namespace mitk
119 
120 #endif // _mitkContourModelSet_H_
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
Base of all data objects.
Definition: mitkBaseData.h:37
std::deque< mitk::ContourModel::Pointer > ContourModelListType
#define MITKCONTOURMODEL_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
virtual ContourModelSetIterator Begin()
Return an iterator a the front.
ContourModelListType m_Contours
virtual ContourModelSetIterator End()
Return an iterator a the front.
ContourModelListType::iterator ContourModelSetIterator
virtual int GetSize() const
Returns the number of contained contours.
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:158
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.