00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef BOUNDINGOBJECTGROUP_H_HEADER_INCLUDED 00018 #define BOUNDINGOBJECTGROUP_H_HEADER_INCLUDED 00019 00020 #include <mitkBoundingObject.h> 00021 #include "MitkExtExports.h" 00022 #include <deque> 00023 00024 namespace mitk { 00025 00026 //##Documentation 00027 //## @brief group object, that contains several mitk::BoundingObjects 00028 //## 00029 //## Calculates a bounding box that contains all sub-bounding boxes. 00030 //## @ingroup Data 00031 class MitkExt_EXPORT BoundingObjectGroup : public mitk::BoundingObject 00032 { 00033 public: 00034 00035 enum CSGMode 00036 { 00037 Union, 00038 Intersection, 00039 Difference 00040 }; 00041 00042 mitkClassMacro(BoundingObjectGroup, mitk::BoundingObject);// itk::VectorContainer<unsigned int ,mitk::BoundingObject::Pointer>); 00043 itkNewMacro(Self); 00044 00045 virtual void UpdateOutputInformation(); 00046 virtual bool IsInside(const mitk::Point3D& p) const; 00047 00048 void SetBoundingObjects(const std::deque<mitk::BoundingObject::Pointer> boundingObjects); 00049 std::deque<mitk::BoundingObject::Pointer> GetBoundingObjects(); 00050 00051 itkSetMacro(CSGMode, mitk::BoundingObjectGroup::CSGMode); 00052 itkGetMacro(CSGMode, mitk::BoundingObjectGroup::CSGMode); 00053 00054 void AddBoundingObject(mitk::BoundingObject::Pointer boundingObject); 00055 void RemoveBoundingObject(mitk::BoundingObject::Pointer boundingObject); 00056 unsigned int GetCount() const; 00057 mitk::Geometry3D * GetGeometry (int t=0) const; 00058 00059 virtual bool VerifyRequestedRegion(); 00060 00061 protected: 00062 BoundingObjectGroup(); 00063 virtual ~BoundingObjectGroup(); 00064 00065 std::deque<mitk::BoundingObject::Pointer> m_BoundingObjects; 00066 unsigned int m_Counter; 00067 CSGMode m_CSGMode; 00068 }; 00069 00070 } 00071 #endif /* BOUNDINGOBJECTGROUP_H_HEADER_INCLUDED */