Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkBoxSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBoxSpatialObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/06/10 13:54:08 $
00007   Version:   $Revision: 1.3 $
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 __itkBoxSpatialObject_h
00019 #define __itkBoxSpatialObject_h
00020 
00021 #include "itkSpatialObject.h"
00022 #include "itkAffineTransform.h"
00023 #include "itkFixedArray.h"
00024 
00025 namespace itk
00026 {
00027 
00036 template < unsigned int TDimension = 3 >
00037 class BoxSpatialObject 
00038   : public SpatialObject< TDimension >
00039 {
00040 
00041 public:
00042 
00043   typedef BoxSpatialObject Self;
00044   typedef double ScalarType;
00045   typedef SmartPointer < Self > Pointer;
00046   typedef SmartPointer < const Self > ConstPointer;
00047   typedef SpatialObject< TDimension > Superclass;
00048   typedef SmartPointer<Superclass> SuperclassPointer;
00049   typedef typename Superclass::PointType              PointType;
00050   typedef typename Superclass::TransformType          TransformType;
00051   typedef typename Superclass::BoundingBoxType        BoundingBoxType;
00052   typedef FixedArray<double,TDimension>               SizeType;
00053   typedef VectorContainer<unsigned long,PointType>    PointContainerType;
00054   
00055   itkNewMacro( Self );
00056   itkTypeMacro( BoxSpatialObject, SpatialObject );
00057 
00059   itkSetMacro( Size, SizeType );
00060   itkGetConstReferenceMacro( Size, SizeType);
00062 
00065   virtual bool ValueAt( const PointType & point, double & value, 
00066                         unsigned int depth=0,
00067                         char * name=NULL) const;
00068 
00071   virtual bool IsEvaluableAt( const PointType & point, 
00072                               unsigned int depth=0,
00073                               char * name=NULL) const;
00074 
00076   virtual bool IsInside( const PointType & point,
00077                          unsigned int depth,
00078                          char *) const;
00079 
00083   virtual bool IsInside( const PointType & point) const;
00084 
00088   virtual bool ComputeLocalBoundingBox() const;
00089 
00090 protected:
00091 
00092   BoxSpatialObject( void );
00093   ~BoxSpatialObject( void );
00094 
00095   SizeType m_Size;
00096 
00098   virtual void PrintSelf( std::ostream& os, Indent indent ) const; 
00099 
00100 };
00101 
00102 } // end namespace itk
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkBoxSpatialObject.txx"
00106 #endif
00107 
00108 #endif // __itkBoxSpatialObject_h
00109 
00110 

Generated at Fri Sep 8 02:46:26 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000