IGSTK
/build/buildd/igstk-4.4.0/Source/igstkBoxObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Image Guided Surgery Software Toolkit
00004   Module:    $RCSfile: igstkBoxObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-11 01:41:50 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
00010   See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm 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 #ifndef __igstkBoxObject_h
00019 #define __igstkBoxObject_h
00020 
00021 #include "igstkMacros.h"
00022 #include "igstkSpatialObject.h"
00023 #include <itkGroupSpatialObject.h>
00024 #include <itkFixedArray.h>
00025 
00026 namespace igstk
00027 {
00028 
00039 class BoxObject 
00040 : public SpatialObject
00041 {
00042 
00043 public:
00044 
00046   igstkStandardClassTraitsMacro( BoxObject, SpatialObject )
00047 
00048 public:
00049   
00051   typedef itk::FixedArray<double,3> ArrayType;
00052 
00054   void SetSize(double x, double y, double z);
00055 
00057   igstkSetMacro( Size , ArrayType );
00058 
00060   igstkGetMacro( Size , ArrayType );
00061   
00063   double GetSizeX() const;
00064  
00066   double GetSizeY() const;
00067  
00069   double GetSizeZ() const;
00070 
00071 protected:
00072 
00073   BoxObject( void );
00074   ~BoxObject( void );
00075 
00076   BoxObject(const Self&);            //purposely not implemented
00077   void operator=(const Self&);       //purposely not implemented
00078 
00080   virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 
00081 
00082 private:
00083   
00085   typedef itk::GroupSpatialObject<3>     BoxSpatialObjectType;
00086 
00087   BoxSpatialObjectType::Pointer m_BoxSpatialObject;
00088   ArrayType                     m_Size;
00089 
00090 };
00091 
00092 } // end namespace igstk
00093 
00094 #endif // __igstkBoxObject_h