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: 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 __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 
00035 template < unsigned int TDimension = 3 >
00036 class ITK_EXPORT BoxSpatialObject 
00037   : public SpatialObject< TDimension >
00038 {
00039 
00040 public:
00041 
00042   typedef BoxSpatialObject                          Self;
00043   typedef double                                    ScalarType;
00044   typedef SmartPointer < Self >                     Pointer;
00045   typedef SmartPointer < const Self >               ConstPointer;
00046   typedef SpatialObject< TDimension >               Superclass;
00047   typedef SmartPointer<Superclass>                  SuperclassPointer;
00048   typedef typename Superclass::PointType            PointType;
00049   typedef typename Superclass::TransformType        TransformType;
00050   typedef typename Superclass::BoundingBoxType      BoundingBoxType;
00051   typedef FixedArray<double,TDimension>             SizeType;
00052   typedef VectorContainer<unsigned long,PointType>  PointContainerType;
00053   
00054   itkNewMacro( Self );
00055   itkTypeMacro( BoxSpatialObject, SpatialObject );
00056 
00058   itkSetMacro( Size, SizeType );
00059   itkGetConstReferenceMacro( Size, SizeType);
00061 
00064   virtual bool ValueAt( const PointType & point, double & value, 
00065                         unsigned int depth=0,
00066                         char * name=NULL) const;
00067 
00070   virtual bool IsEvaluableAt( const PointType & point, 
00071                               unsigned int depth=0,
00072                               char * name=NULL) const;
00073 
00075   virtual bool IsInside( const PointType & point,
00076                          unsigned int depth,
00077                          char *) const;
00078 
00082   virtual bool IsInside( const PointType & point) const;
00083 
00087   virtual bool ComputeLocalBoundingBox() const;
00088 
00089 protected:
00090   BoxSpatialObject(const Self&); //purposely not implemented
00091   void operator=(const Self&); //purposely not implemented
00092    
00093   BoxSpatialObject( void );
00094   ~BoxSpatialObject( void );
00095 
00096   SizeType m_Size;
00097 
00099   virtual void PrintSelf( std::ostream& os, Indent indent ) const; 
00100 
00101 };
00102 
00103 } // end namespace itk
00104 
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkBoxSpatialObject.txx"
00107 #endif
00108 
00109 #endif // __itkBoxSpatialObject_h
00110 

Generated at Fri Apr 16 17:59:50 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000