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: 2003/10/26 23:29:02 $ 00007 Version: $Revision: 1.20 $ 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 __itkImageSpatialObject_h 00019 #define __itkImageSpatialObject_h 00020 00021 #include "itkImage.h" 00022 #include "itkExceptionObject.h" 00023 #include "itkSpatialObject.h" 00024 00025 namespace itk 00026 { 00027 00037 template < unsigned int TDimension = 3, 00038 class PixelType = unsigned char 00039 > 00040 class ImageSpatialObject 00041 : public SpatialObject< TDimension > 00042 { 00043 00044 public: 00045 00046 typedef double ScalarType; 00047 typedef ImageSpatialObject< TDimension, PixelType > Self; 00048 typedef SpatialObject< TDimension > Superclass; 00049 typedef SmartPointer< Self > Pointer; 00050 typedef SmartPointer< const Self > ConstPointer; 00051 00052 typedef Image< PixelType, TDimension > ImageType; 00053 typedef typename ImageType::Pointer ImagePointer; 00054 typedef typename ImageType::IndexType IndexType; 00055 typedef typename ImageType::RegionType RegionType; 00056 typedef typename Superclass::TransformType TransformType; 00057 typedef typename Superclass::PointType PointType; 00058 typedef typename Superclass::BoundingBoxType BoundingBoxType; 00059 00060 typedef VectorContainer< unsigned long, PointType> PointContainerType; 00061 typedef typename PointContainerType::Pointer PointContainerPointer; 00062 00064 itkNewMacro( Self ); 00065 00067 itkTypeMacro( ImageSpatialObject, SpatialObject ); 00068 00070 void SetImage( ImageType * image ); 00071 00073 ImageType * GetImage( void ); 00074 00077 bool IsEvaluableAt( const PointType & point, 00078 unsigned int depth=0, char *name=NULL) const; 00079 00083 bool ValueAt( const PointType & point, double & value, 00084 unsigned int depth=0, char *name=NULL) const; 00085 00086 00088 bool IsInside( const PointType & point, 00089 unsigned int depth=0, char *name=NULL) const; 00090 00092 bool ComputeBoundingBox() const; 00093 00095 unsigned long GetMTime( void ) const; 00096 00098 void SetSlicePosition(unsigned int dimension, int position); 00099 00101 int GetSlicePosition(unsigned int dimension) 00102 {return m_SlicePosition[dimension];} 00103 00104 const char* GetPixelType() 00105 { 00106 return m_PixelType.c_str(); 00107 } 00108 00109 protected: 00110 00111 ImagePointer m_Image; 00112 00113 ImageSpatialObject(); 00114 virtual ~ImageSpatialObject(); 00115 00116 void PrintSelf( std::ostream& os, Indent indent ) const; 00117 00118 int* m_SlicePosition; 00119 std::string m_PixelType; 00120 }; 00121 00122 } // end of namespace itk 00123 00124 #ifndef ITK_MANUAL_INSTANTIATION 00125 #include "itkImageSpatialObject.txx" 00126 #endif 00127 00128 #endif //__itkImageSpatialObject_h

Generated at Sun Apr 1 02:35:43 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000