16 #include <vtkLinearTransform.h> 19 : m_BoundingObjects(0), m_Counter(0), m_CSGMode(Union)
22 timeGeometry->Initialize(1);
36 this->
GetSource()->UpdateOutputInformation();
45 timeGeometry->Initialize(1);
53 mitk::BoundingBox::PointsContainer::Pointer pointscontainer = mitk::BoundingBox::PointsContainer::New();
55 mitk::BoundingBox::PointIdentifier pointid = 0;
59 mitk::AffineTransform3D::Pointer inverse = mitk::AffineTransform3D::New();
60 transform->GetInverse(inverse);
69 for (i = 0; i < 8; ++i)
72 if (point[0] * point[0] + point[1] * point[1] + point[2] * point[2] <
mitk::large)
73 pointscontainer->InsertElement(pointid++, point);
76 itkGenericOutputMacro(<<
"Unrealistically distant corner point encountered. Ignored. BoundingObject: " 82 mitk::BoundingBox::Pointer boundingBox = mitk::BoundingBox::New();
83 boundingBox->SetPoints(pointscontainer);
84 boundingBox->ComputeBoundingBox();
88 geometry3d->
SetBounds(boundingBox->GetBounds());
93 timeGeometry->Initialize(geometry3d,
GetTimeGeometry()->CountTimeSteps());
99 if (boundingObject->GetPositive())
123 bool posInside =
false;
124 bool negInside =
false;
148 if (posInside && !negInside)
179 return Superclass::GetGeometry(t);
itk::SmartPointer< mitk::BaseDataSource > GetSource() const
Get the process object that generated this data object.
Point3D GetCornerPointInWorld(int id) const
Get the position of the corner number id (in world coordinates)
std::deque< mitk::BoundingObject::Pointer > m_BoundingObjects
void SetIndexToWorldTransform(mitk::AffineTransform3D *transform)
virtual void SetTimeGeometry(TimeGeometry *geometry)
Set the TimeGeometry of the data, which will be referenced (not copied!).
void RemoveBoundingObject(mitk::BoundingObject::Pointer boundingObject)
void AddBoundingObject(mitk::BoundingObject::Pointer boundingObject)
unsigned int GetCount() const
~BoundingObjectGroup() override
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
bool IsInside(const mitk::Point3D &p) const override
std::deque< mitk::BoundingObject::Pointer > GetBoundingObjects()
void UpdateOutputInformation() override
itk::AffineGeometryFrame< ScalarType, 3 >::TransformType AffineTransform3D
virtual void SetVtkPolyData(vtkPolyData *polydata, unsigned int t=0)
MITKCORE_EXPORT const double large
void SetBounds(const BoundsArrayType &bounds)
Set the bounding box (in index/unit coordinates)
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
void SetBoundingObjects(const std::deque< mitk::BoundingObject::Pointer > boundingObjects)
void Update()
Updates the geometry.
BaseGeometry Describes the geometry of a data object.
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.
BoundingBoxType::BoundsArrayType BoundsArrayType
mitk::BaseGeometry * GetGeometry(int t=0) const