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

itkImageSpatialObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageSpatialObject.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/10/09 21:34:49 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkImageSpatialObject_h
00019 #define __itkImageSpatialObject_h
00020 
00021 #include "itkRGBPixel.h"
00022 #include "itkImage.h"
00023 #include "itkExceptionObject.h"
00024 #include "itkSpatialObject.h"
00025 
00026 namespace itk
00027 {
00028   
00038 template < unsigned int NDimensions = 3,
00039            class TransformType = AffineTransform< double,
00040                                                   NDimensions>,
00041            class PixelType = RGBPixel< char > ,
00042            unsigned int PipelineDimension = 3
00043          >
00044 class ImageSpatialObject 
00045 : public SpatialObject< NDimensions, TransformType , PipelineDimension >
00046 {
00047 
00048 public:
00049  
00050   typedef double ScalarType; 
00051   typedef ImageSpatialObject< NDimensions, TransformType, PixelType , PipelineDimension > Self;
00052   typedef SpatialObject< NDimensions, TransformType > Superclass;
00053   typedef SmartPointer< Self > Pointer;
00054   typedef SmartPointer< const Self > ConstPointer;
00055 
00056   typedef Image< PixelType, NDimensions > ImageType;
00057   typedef typename ImageType::Pointer ImagePointer;
00058   typedef typename ImageType::IndexType IndexType;
00059   typedef typename ImageType::RegionType RegionType;
00060 
00061   typedef typename Superclass::PointType PointType;
00062   typedef typename Superclass::BoundingBoxType BoundingBoxType;
00063 
00064   typedef VectorContainer< unsigned long, PointType> PointContainerType;
00065   typedef typename PointContainerType::Pointer PointContainerPointer;
00066 
00068   itkNewMacro( Self );
00069 
00071   itkTypeMacro( Self, Superclass );
00072 
00074   void SetImage( ImageType * image );
00075 
00077   ImageType * GetImage( void );
00078 
00081   bool IsEvaluableAt( const PointType & point );
00082 
00086   void ValueAt( const PointType & point, double & value );
00087   
00089   bool IsInside( const PointType & point );
00090  
00092   void ComputeBounds( void );
00093 
00095   unsigned long GetMTime( void ) const;
00096 
00098   void SetSlicePosition(unsigned int dimension, int position) {m_SlicePosition[dimension]=position;}
00099 
00101   int GetSlicePosition(unsigned int dimension) {return m_SlicePosition[dimension];}
00102 
00103 protected:
00104 
00105   ImagePointer m_Image;
00106 
00107   ImageSpatialObject();
00108   virtual ~ImageSpatialObject();
00109 
00110   void PrintSelf( std::ostream& os, Indent indent ) const;
00111 
00112   int* m_SlicePosition;
00113 };
00114 
00115 } // end of namespace itk
00116 
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118   #include "itkImageSpatialObject.txx"
00119 #endif
00120 
00121 #endif //__itkImageSpatialObject_h

Generated at Wed Mar 12 01:13:02 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000