itkSlicerBoxSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSlicerBoxSpatialObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-07 14:33:56 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/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 __itkSlicerBoxSpatialObject_h
00019 #define __itkSlicerBoxSpatialObject_h
00020 
00021 #include "itkSpatialObject.h"
00022 #include "itkAffineTransform.h"
00023 #include "itkFixedArray.h"
00024 
00025 namespace itk
00026 {
00027 
00038 template < unsigned int TDimension = 3 >
00039 class ITK_EXPORT SlicerBoxSpatialObject 
00040   : public SpatialObject< TDimension >
00041 {
00042 
00043 public:
00044 
00045   typedef SlicerBoxSpatialObject                          Self;
00046   typedef double                                    ScalarType;
00047   typedef SmartPointer < Self >                     Pointer;
00048   typedef SmartPointer < const Self >               ConstPointer;
00049   typedef SpatialObject< TDimension >               Superclass;
00050   typedef SmartPointer<Superclass>                  SuperclassPointer;
00051   typedef typename Superclass::PointType            PointType;
00052   typedef typename Superclass::TransformType        TransformType;
00053   typedef typename Superclass::BoundingBoxType      BoundingBoxType;
00054   typedef FixedArray<double,TDimension>             SizeType;
00055   typedef VectorContainer<unsigned long,PointType>  PointContainerType;
00056   
00057   itkNewMacro( Self );
00058   itkTypeMacro( SlicerBoxSpatialObject, SpatialObject );
00059 
00061   itkSetMacro( Size, SizeType );
00062   itkGetConstReferenceMacro( Size, SizeType);
00063 
00066   virtual bool ValueAt( const PointType & point, double & value, 
00067                         unsigned int depth=0,
00068                         char * name=NULL) const;
00069      
00072   virtual bool IsEvaluableAt( const PointType & point, 
00073                               unsigned int depth=0,
00074                               char * name=NULL) const;
00075 
00077   virtual bool IsInside( const PointType & point,
00078                          unsigned int depth,
00079                          char *) const;
00080 
00084   virtual bool IsInside( const PointType & point) const;
00085 
00089   virtual bool ComputeLocalBoundingBox() const;
00090 
00091 protected:
00092   SlicerBoxSpatialObject(const Self&); //purposely not implemented
00093   void operator=(const Self&); //purposely not implemented
00094    
00095   SlicerBoxSpatialObject( void );
00096   ~SlicerBoxSpatialObject( void );
00097 
00098   SizeType m_Size;
00099 
00101   virtual void PrintSelf( std::ostream& os, Indent indent ) const; 
00102 
00103 };
00104 
00105 } // end namespace itk
00106 
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkSlicerBoxSpatialObject.txx"
00109 #endif
00110 
00111 #endif // __itkSlicerBoxSpatialObject_h

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1