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

itkSurfaceSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:  $RCSfile: itkSurfaceSpatialObject.h,v $
00005   Language:  C++
00006   Date:    $Date: 2003/11/07 23:27:29 $
00007   Version:   $Revision: 1.15 $
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 __itkSurfaceSpatialObject_h
00019 #define __itkSurfaceSpatialObject_h
00020 
00021 #include <list>
00022 
00023 #include "itkPointBasedSpatialObject.h"
00024 #include "itkSurfaceSpatialObjectPoint.h"
00025 
00026 namespace itk 
00027 {
00028 
00038 template < unsigned int TDimension = 3 >
00039 class SurfaceSpatialObject 
00040   :public PointBasedSpatialObject<  TDimension >
00041 {
00042 
00043 public:
00044 
00045   typedef SurfaceSpatialObject                          Self;
00046   typedef PointBasedSpatialObject< TDimension >         Superclass;
00047   typedef SmartPointer < Self >                         Pointer;
00048   typedef SmartPointer < const Self >                   ConstPointer;
00049   typedef double                                        ScalarType;
00050   typedef SurfaceSpatialObjectPoint< TDimension >       SurfacePointType;
00051   typedef std::vector< SurfacePointType >                PointListType;
00052   typedef typename Superclass::SpatialObjectPointType   SpatialObjectPointType;
00053   typedef typename Superclass::PointType                PointType;
00054   typedef typename Superclass::TransformType            TransformType;
00055   typedef VectorContainer<unsigned long,PointType>      PointContainerType;
00056   typedef SmartPointer<PointContainerType>              PointContainerPointer;
00057 
00059   itkNewMacro( Self );
00060 
00062   itkTypeMacro( Self, Superclass );
00063   
00065   PointListType & GetPoints( void );
00066   
00068   const SpatialObjectPointType* GetPoint(unsigned long id) const {return &(m_Points[id]);}
00069   
00071   unsigned long GetNumberOfPoints(void) const {return m_Points.size();}
00072 
00074   void SetPoints( PointListType & newPoints );
00075 
00078   bool IsEvaluableAt( const PointType & point,
00079                       unsigned int depth=0, char * name=NULL) const;
00080 
00085   bool ValueAt( const PointType & point, double & value,
00086                 unsigned int depth=0, char * name=NULL) const;
00087 
00089   bool IsInside( const PointType & point,
00090                  unsigned int depth=0, char * name=NULL) const;
00091 
00093   bool ComputeBoundingBox( ) const;
00094 
00095 protected:
00096 
00097   PointListType  m_Points;
00098 
00099   SurfaceSpatialObject();
00100   virtual ~SurfaceSpatialObject();
00101 
00103   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00104 };
00105 
00106 } // end namespace itk
00107 
00108 #ifndef ITK_MANUAL_INSTANTIATION 
00109 #include "itkSurfaceSpatialObject.txx" 
00110 #endif 
00111 
00112 #endif // __itkSurfaceSpatialObject_h

Generated at Sun Jan 25 13:19:46 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000