52 if (index >= 0 && static_cast<ContourModelListType::size_type>(index) < this->
m_Contours.size())
54 return this->
m_Contours.at(index).GetPointer();
81 if ((*it) == contourModel)
96 if (index >= 0 && static_cast<ContourModelListType::size_type>(index) < this->
m_Contours.size())
118 this->
GetSource()->UpdateOutputInformation();
127 typedef itk::BoundingBox<unsigned long, 3, ScalarType>
BoundingBoxType;
128 typedef BoundingBoxType::PointsContainer PointsContainer;
133 for (
int currenTimeStep = 0; currenTimeStep < timesteps; currenTimeStep++)
145 BoundingBoxType::Pointer boundingBox = BoundingBoxType::New();
147 PointsContainer::Pointer points = PointsContainer::New();
149 auto contoursIt = this->
Begin();
150 auto contoursEnd = this->
End();
152 while (contoursIt != contoursEnd)
154 auto it = contoursIt->GetPointer()->Begin(currenTimeStep);
155 auto end = contoursIt->GetPointer()->End(currenTimeStep);
160 Point3D currentP = (*it)->Coordinates;
161 BoundingBoxType::PointType p;
162 p.CastFrom(currentP);
163 points->InsertElement(points->Size(), p);
172 boundingBox->SetPoints(points);
173 boundingBox->ComputeBoundingBox();
175 mitkBounds[0] = tmp[0];
176 mitkBounds[1] = tmp[1];
177 mitkBounds[2] = tmp[2];
178 mitkBounds[3] = tmp[3];
179 mitkBounds[4] = tmp[4];
180 mitkBounds[5] = tmp[5];
itk::SmartPointer< mitk::BaseDataSource > GetSource() const
Get the process object that generated this data object.
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Base of all data objects.
void UpdateOutputInformation() override
Update the OutputInformation of a ContourModel object.
virtual bool RemoveContourModel(mitk::ContourModel *contourModel)
Remove the given ContourModel from the container if exists.
std::deque< mitk::ContourModel::Pointer > ContourModelListType
DataCollection - Class to facilitate loading/accessing structured data.
void InitializeEmpty() override
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least creat...
virtual ContourModelSetIterator Begin()
Return an iterator a the front.
ContourModelListType m_Contours
virtual ContourModelSetIterator End()
Return an iterator a the front.
virtual void AddContourModel(mitk::ContourModel &contourModel)
Add a ContourModel to the container.
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
virtual bool RemoveContourModelAt(int index)
Remove a ContourModel at given index within the container if exists.
ContourModelListType * GetContourModelList()
Returns the container of the contours.
itk::BoundingBox< unsigned long, 3, mitk::ScalarType > BoundingBoxType
virtual mitk::ContourModel * GetContourModelAt(int index) const
Returns the ContourModel a given index.
unsigned long GetMTime() const override
Get the modified time of the last change of the contents this data object or its geometry.
void SetBounds(const BoundsArrayType &bounds)
Set the bounding box (in index/unit coordinates)
~ContourModelSet() override
unsigned int GetTimeSteps() const
Get the number of time steps from the TimeGeometry As the base data has not a data vector given by it...
bool IsEmpty() const override
Returns a bool whether the container is empty or not.
void Update()
Updates the geometry.
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
void Clear() override
Clear the storage container.
virtual void InitializeTimeGeometry(unsigned int timeSteps=1)
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and eve...
BaseGeometry Describes the geometry of a data object.
BoundingBoxType::BoundsArrayType BoundsArrayType