X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=lib%2FcpPlugins%2FBoundingBox.h;fp=lib%2FcpPlugins%2FBoundingBox.h;h=b29cf2d5b5ea4c03cc254cba6909a4850c721805;hb=201c5026430f9bcc33f9db6a39f5d03db096c860;hp=0000000000000000000000000000000000000000;hpb=aa77db36cc1d87ba014c982a235239c3c87224f3;p=cpPlugins.git diff --git a/lib/cpPlugins/BoundingBox.h b/lib/cpPlugins/BoundingBox.h new file mode 100644 index 0000000..b29cf2d --- /dev/null +++ b/lib/cpPlugins/BoundingBox.h @@ -0,0 +1,76 @@ +#ifndef __CPPLUGINS__BOUNDINGBOX__H__ +#define __CPPLUGINS__BOUNDINGBOX__H__ + +#include +#include + +namespace cpPlugins +{ + /** + */ + class cpPlugins_EXPORT BoundingBox + : public DataObject + { + public: + typedef BoundingBox Self; + typedef DataObject Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + public: + itkNewMacro( Self ); + itkTypeMacro( BoundingBox, DataObject ); + cpPlugins_Id_Macro( BoundingBox, Object ); + + public: + void SetDataObject( DataObject* o ); + virtual void SetITK( itk::LightObject* o ) ITK_OVERRIDE; + virtual void SetVTK( vtkObjectBase* o ) ITK_OVERRIDE; + + void Copy( Self* other ); + void Blend( Self* other ); + + template< class _TPoint > + inline void SetMinimum( const _TPoint& p ); + + template< class _TPoint > + inline void SetMaximum( const _TPoint& p ); + + template< class _TPoint > + inline _TPoint GetMinimum( ) const; + + template< class _TPoint > + inline _TPoint GetMaximum( ) const; + + protected: + BoundingBox( ); + virtual ~BoundingBox( ); + + template< class _TPoint > + inline void _SetPoint( unsigned int m, const _TPoint& p ); + + template< class _TPoint > + inline _TPoint _GetPoint( unsigned int m ) const; + + template< unsigned int _NDim > + inline bool _ITKImage( itk::LightObject* o ); + + template< class _TScalar, unsigned int _NDim > + inline bool _ITKPointSet( itk::LightObject* o ); + + private: + // Purposely not implemented + BoundingBox( const Self& ); + Self& operator=( const Self& ); + + protected: + std::vector< double > m_Points[ 2 ]; + }; + +} // ecapseman + +#include + +#endif // __CPPLUGINS__BOUNDINGBOX__H__ + +// eof - $RCSfile$