Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 #ifndef _mitkContourModelSet_H_
17 #define _mitkContourModelSet_H_
18 
19 #include "mitkCommon.h"
21 
22 #include "mitkContourModel.h"
23 
24 #include <deque>
25 
26 namespace mitk
27 {
31  {
32  public:
34 
35  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
36 
38  typedef ContourModelListType::iterator ContourModelSetIterator;
39 
40  // start of inline methods
41 
44  virtual ContourModelSetIterator Begin() { return this->m_Contours.begin(); }
47  virtual ContourModelSetIterator End() { return this->m_Contours.end(); }
50  virtual int GetSize() const { return this->m_Contours.size(); }
51  // end of inline methods
52 
55  virtual void AddContourModel(mitk::ContourModel &contourModel);
56 
59  virtual void AddContourModel(mitk::ContourModel::Pointer contourModel);
60 
64  virtual mitk::ContourModel *GetContourModelAt(int index) const;
65 
68  ContourModelListType *GetContourModelList();
69 
72  bool IsEmpty() const override;
73 
77  virtual bool RemoveContourModel(mitk::ContourModel *contourModel);
78 
82  virtual bool RemoveContourModelAt(int index);
83 
86  virtual void Clear() override;
87 
89 
90  /* NO support for regions ! */
91 
93  bool RequestedRegionIsOutsideOfTheBufferedRegion() override { return false; }
94  bool VerifyRequestedRegion() override { return true; }
95  void SetRequestedRegion(const itk::DataObject *) override {}
101  virtual void UpdateOutputInformation() override;
102 
104 
105  protected:
106  mitkCloneMacro(Self);
107 
108  ContourModelSet();
110  virtual ~ContourModelSet();
111 
112  // inherit from BaseData. Initial state with no contours and a single timestep.
113  virtual void InitializeEmpty() override;
114 
116 
117  // only update the bounding geometry if necessary
119  };
120 } // namespace mitk
121 
122 #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:39
std::deque< mitk::ContourModel::Pointer > ContourModelListType
#define MITKCONTOURMODEL_EXPORT
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
ContourModelListType m_Contours
virtual ContourModelSetIterator End()
Return an iterator a the front.
virtual int GetSize() const
Returns the number of contained contours.
ContourModelListType::iterator ContourModelSetIterator
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:44
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:162
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.