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

itkMeshSpatialObject.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMeshSpatialObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/10/07 01:03:08 $ 00007 Version: $Revision: 1.2 $ 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 __itkMeshSpatialObject_h 00019 #define __itkMeshSpatialObject_h 00020 00021 #include "itkMesh.h" 00022 #include "itkExceptionObject.h" 00023 #include "itkSpatialObject.h" 00024 00025 namespace itk 00026 { 00027 00037 template <class TMesh = Mesh<int> > 00038 class MeshSpatialObject 00039 : public SpatialObject< ::itk::GetMeshDimension<TMesh>::PointDimension > 00040 { 00041 00042 public: 00043 00044 typedef double ScalarType; 00045 typedef MeshSpatialObject< TMesh> Self; 00046 00047 itkStaticConstMacro(Dimension, unsigned int,TMesh::PointDimension); 00048 00049 typedef SpatialObject< itkGetStaticConstMacro(Dimension) > Superclass; 00050 typedef SmartPointer< Self > Pointer; 00051 typedef SmartPointer< const Self > ConstPointer; 00052 00053 typedef TMesh MeshType; 00054 typedef typename MeshType::Pointer MeshPointer; 00055 typedef typename Superclass::TransformType TransformType; 00056 typedef typename Superclass::PointType PointType; 00057 typedef typename Superclass::BoundingBoxType BoundingBoxType; 00058 00059 typedef VectorContainer< unsigned long, PointType> PointContainerType; 00060 typedef typename PointContainerType::Pointer PointContainerPointer; 00061 00063 itkNewMacro( Self ); 00064 00066 itkTypeMacro( MeshSpatialObject, SpatialObject ); 00067 00069 void SetMesh( MeshType * Mesh ); 00070 00072 MeshType * GetMesh( void ); 00073 00076 bool IsEvaluableAt( const PointType & point, 00077 unsigned int depth=0, char *name=NULL) const; 00078 00082 bool ValueAt( const PointType & point, double & value, 00083 unsigned int depth=0, char *name=NULL) const; 00084 00086 bool IsInside( const PointType & point, 00087 unsigned int depth=0, char *name=NULL) const; 00088 00090 bool ComputeBoundingBox() const; 00091 00093 unsigned long GetMTime( void ) const; 00094 00096 const char* GetPixelType() 00097 { 00098 return m_PixelType.c_str(); 00099 } 00100 00101 00102 protected: 00103 00104 MeshPointer m_Mesh; 00105 std::string m_PixelType; 00106 MeshSpatialObject(); 00107 virtual ~MeshSpatialObject(); 00108 00109 void PrintSelf( std::ostream& os, Indent indent ) const; 00110 00111 }; 00112 00113 } // end of namespace itk 00114 00115 #ifndef ITK_MANUAL_INSTANTIATION 00116 #include "itkMeshSpatialObject.txx" 00117 #endif 00118 00119 #endif //__itkMeshSpatialObject_h

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