00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __MetaMeshConverter__h
00018 #define __MetaMeshConverter__h
00019
00020
00021 #include "metaMesh.h"
00022 #include "itkMeshSpatialObject.h"
00023 #include "itkSpatialObject.h"
00024
00025 namespace itk
00026 {
00027
00028 template <unsigned int NDimensions,
00029 typename PixelType = unsigned char,
00030 typename TMeshTraits = DefaultStaticMeshTraits< PixelType , NDimensions, NDimensions >
00031 >
00032 class MetaMeshConverter
00033 {
00034
00035 public:
00036
00037 MetaMeshConverter();
00038 ~MetaMeshConverter() {};
00039
00040 typedef itk::Mesh<PixelType,NDimensions,TMeshTraits> MeshType;
00041 typedef itk::MeshSpatialObject<MeshType> SpatialObjectType;
00042
00043 typedef typename SpatialObjectType::TransformType TransformType;
00044
00045 typedef typename SpatialObjectType::Pointer SpatialObjectPointer;
00046
00047 SpatialObjectPointer ReadMeta(const char* name);
00048
00049 bool WriteMeta(SpatialObjectType* spatialObject,const char* name);
00050
00051 SpatialObjectPointer MetaMeshToMeshSpatialObject(MetaMesh * Mesh);
00052 MetaMesh* MeshSpatialObjectToMetaMesh(SpatialObjectType * spatialObject);
00053
00054 };
00055
00056 }
00057
00058 #ifndef ITK_MANUAL_INSTANTIATION
00059 #include "itkMetaMeshConverter.txx"
00060 #endif
00061
00062
00063 #endif