00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __MetaSceneConverter__h
00018
#define __MetaSceneConverter__h
00019
00020
#include "itkSpatialObject.h"
00021
#include "metaScene.h"
00022
#include "itkSceneSpatialObject.h"
00023
00024
namespace itk
00025 {
00026
00027
template <
unsigned int NDimensions,
class PixelType =
unsigned char>
00028 class MetaSceneConverter
00029 {
00030
00031
public:
00032
00033
MetaSceneConverter();
00034
~MetaSceneConverter();
00035
00036
itkStaticConstMacro(MaximumDepth,
unsigned int, 9999999);
00037
00038 typedef itk::SceneSpatialObject<NDimensions> SceneType;
00039 typedef typename SceneType::Pointer
ScenePointer;
00040
00041
ScenePointer ReadMeta(
const char* name);
00042
00043
bool WriteMeta(
SceneType * scene,
const char* fileName,
00044
unsigned int depth=MaximumDepth,
00045
char * spatialObjectTypeName=NULL);
00046
00047
private:
00048
00049
typedef itk::SpatialObject<NDimensions> SpatialObjectType;
00050
typedef typename SpatialObjectType::Pointer SpatialObjectPointer;
00051
typedef typename SpatialObjectType::TransformType TransformType ;
00052
00053
typedef std::list<MetaObject*> MetaObjectListType;
00054
00055 MetaScene * CreateMetaScene(
SceneType * scene,
00056
unsigned int depth=MaximumDepth,
00057
char * name=NULL);
00058
00059
ScenePointer CreateSpatialObjectScene( MetaScene * scene );
00060
00061
void SetTransform(MetaObject* obj, TransformType* transform) ;
00062
void SetTransform(
SpatialObjectType* so, MetaObject* obj) ;
00063
00064
float m_Orientation[100] ;
00065
float m_Position[10] ;
00066
float m_CenterOfRotation[10] ;
00067
00068 };
00069
00070 }
00071
00072
#ifndef ITK_MANUAL_INSTANTIATION
00073
#include "itkMetaSceneConverter.txx"
00074
#endif
00075
00076
00077
#endif