Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkBoundingObjectGroup.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 mitkBoundingObjectGroup_h
13 #define mitkBoundingObjectGroup_h
14 
16 #include <deque>
17 #include <mitkBoundingObject.h>
18 
19 namespace mitk
20 {
36  {
37  public:
41  enum CSGMode
42  {
45  Difference
46  };
47 
49  itkFactorylessNewMacro(Self);
50  itkCloneMacro(Self);
51 
53  void UpdateOutputInformation() override;
54 
61  bool IsInside(const mitk::Point3D &p) const override;
62 
68  void SetBoundingObjects(const std::deque<mitk::BoundingObject::Pointer> boundingObjects);
69 
75  std::deque<mitk::BoundingObject::Pointer> GetBoundingObjects();
76 
81 
90  void AddBoundingObject(mitk::BoundingObject::Pointer boundingObject);
91 
99  void RemoveBoundingObject(mitk::BoundingObject::Pointer boundingObject);
100 
106  unsigned int GetCount() const;
107 
114  mitk::BaseGeometry *GetGeometry(int t = 0) const;
115 
121  bool VerifyRequestedRegion() override;
122 
123  protected:
126 
127  std::deque<mitk::BoundingObject::Pointer> m_BoundingObjects;
128  unsigned int m_Counter;
130  };
131 }
132 #endif
#define MITKDATATYPESEXT_EXPORT
Abstract base class describing the geometry of a data object.
Group object that contains several mitk::BoundingObject instances.
unsigned int GetCount() const
Get the number of bounding objects in this group.
CSGMode
CSG combination mode for the group.
@ Union
A point is inside if it is inside at least one positive and no negative object.
@ Intersection
A point is inside only if it is inside every object.
bool IsInside(const mitk::Point3D &p) const override
Test whether a point is inside the group according to the current CSGMode.
std::deque< mitk::BoundingObject::Pointer > GetBoundingObjects()
Get a copy of the internal bounding object collection.
void UpdateOutputInformation() override
Recompute the combined bounding box from all sub-objects.
void AddBoundingObject(mitk::BoundingObject::Pointer boundingObject)
Add a bounding object to the group.
bool VerifyRequestedRegion() override
Verify that the requested region is valid.
mitk::BaseGeometry * GetGeometry(int t=0) const
Get the geometry for the given time step.
void SetBoundingObjects(const std::deque< mitk::BoundingObject::Pointer > boundingObjects)
Replace the internal collection of bounding objects.
mitkClassMacro(BoundingObjectGroup, mitk::BoundingObject)
void RemoveBoundingObject(mitk::BoundingObject::Pointer boundingObject)
Remove a bounding object from the group.
std::deque< mitk::BoundingObject::Pointer > m_BoundingObjects
Abstract superclass of all bounding objects (cylinder, cuboid, cone, ellipsoid, etc....
Find image slices visible on a given plane.