19 timeGeometry->Initialize(1);
29 m_ContourVector.insert(std::make_pair(index, contour));
34 m_ContourVector.erase(index);
40 auto contoursIterator = contourVec.begin();
41 auto contoursIteratorEnd = contourVec.end();
44 mitk::BoundingBox::PointsContainer::Pointer pointscontainer = mitk::BoundingBox::PointsContainer::New();
46 mitk::BoundingBox::PointIdentifier pointid = 0;
50 mitk::AffineTransform3D::Pointer inverse = mitk::AffineTransform3D::New();
51 transform->GetInverse(inverse);
55 while (contoursIterator != contoursIteratorEnd)
57 const TimeGeometry *geometry = (*contoursIterator).second->GetUpdatedTimeGeometry();
59 for (i = 0; i < 8; ++i)
62 if (point[0] * point[0] + point[1] * point[1] + point[2] * point[2] <
mitk::large)
63 pointscontainer->InsertElement(pointid++, point);
66 itkGenericOutputMacro(<<
"Unrealistically distant corner point encountered. Ignored. BoundingObject: " 67 << (*contoursIterator).second);
73 mitk::BoundingBox::Pointer boundingBox = mitk::BoundingBox::New();
74 boundingBox->SetPoints(pointscontainer);
75 boundingBox->ComputeBoundingBox();
79 geometry3d->
SetBounds(boundingBox->GetBounds());
82 timeGeometry->Initialize(geometry3d,
GetTimeGeometry()->CountTimeSteps());
108 timeGeometry->Initialize(1);
114 return m_ContourVector.size();
119 return m_ContourVector;
Point3D GetCornerPointInWorld(int id) const
Get the position of the corner number id (in world coordinates)
void SetIndexToWorldTransform(mitk::AffineTransform3D *transform)
bool VerifyRequestedRegion() override
virtual void SetTimeGeometry(TimeGeometry *geometry)
Set the TimeGeometry of the data, which will be referenced (not copied!).
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
void UpdateOutputInformation() override
void SetRequestedRegionToLargestPossibleRegion() override
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
void Initialize() override
itk::AffineGeometryFrame< ScalarType, 3 >::TransformType AffineTransform3D
std::map< unsigned long, Contour::Pointer > ContourVectorType
MITKCORE_EXPORT const double large
ContourVectorType GetContours()
void SetBounds(const BoundsArrayType &bounds)
Set the bounding box (in index/unit coordinates)
void SetRequestedRegion(const itk::DataObject *data) override
void AddContour(unsigned int index, mitk::Contour::Pointer contour)
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
BaseGeometry Describes the geometry of a data object.
void RemoveContour(unsigned long index)
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.
unsigned int GetNumberOfContours()