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 00018 00019 #ifndef BOUNDINGOBJECT_H_HEADER_INCLUDED 00020 #define BOUNDINGOBJECT_H_HEADER_INCLUDED 00021 00022 #include <mitkSurface.h> 00023 #include "MitkExtExports.h" 00024 00025 namespace mitk { 00026 00027 //##Documentation 00028 //## @brief superclass of all bounding objects (cylinder, cuboid,...) 00029 //## 00030 //## Manages generic functions and provides an interface for IsInside() 00031 //## calculates a generic bounding box 00032 //## @ingroup Data 00033 class MitkExt_EXPORT BoundingObject : public mitk::Surface //BaseData 00034 { 00035 public: 00036 mitkClassMacro(BoundingObject, mitk::Surface); 00037 00038 virtual bool IsInside(const mitk::Point3D& p) const=0; 00039 00040 virtual mitk::ScalarType GetVolume(); 00041 itkGetMacro(Positive, bool); 00042 itkSetMacro(Positive, bool); 00043 itkBooleanMacro(Positive); 00044 00045 //##Documentation 00046 //## @brief Sets the Geometry3D of the bounding object to fit the given 00047 //## geometry. 00048 //## 00049 //## The fit is done once, so if the given geometry changes it will 00050 //## \em not effect the bounding object. 00051 virtual void FitGeometry(Geometry3D* aGeometry3D); 00052 protected: 00053 BoundingObject(); 00054 virtual ~BoundingObject(); 00055 00056 bool WriteXMLData( XMLWriter& xmlWriter ); 00057 00058 //##Documentation 00059 //## \brief If \a true, the Boundingobject describes a positive volume, 00060 //## if \a false a negative volume. 00061 //## 00062 bool m_Positive; 00063 }; 00064 00065 } 00066 #endif /* BOUNDINGOBJECT_H_HEADER_INCLUDED */