18 #ifndef __itkMetaSceneConverter_h
19 #define __itkMetaSceneConverter_h
21 #include "metaScene.h"
41 template<
unsigned int NDimensions,
42 typename PixelType =
unsigned char,
43 typename TMeshTraits =
44 DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >
62 itkStaticConstMacro(MaximumDepth,
unsigned int, 9999999);
68 bool WriteMeta(
SceneType *scene,
const char *fileName,
69 unsigned int depth = MaximumDepth,
70 char *spatialObjectTypeName =
NULL);
79 void SetTransformPrecision(
unsigned int precision)
81 m_TransformPrecision = precision;
87 void SetWriteImagesInSeparateFile(
bool separate)
89 m_WriteImagesInSeparateFile = separate;
98 void RegisterMetaConverter(
const char *metaTypeName,
99 const char *spatialObjectTypeName,
100 MetaConverterBaseType *converter);
102 MetaScene * CreateMetaScene(SceneType *scene,
103 unsigned int depth = MaximumDepth,
106 ScenePointer CreateSpatialObjectScene(MetaScene *scene);
116 template <
typename TConverter>
119 typename TConverter::Pointer converter = TConverter::New();
121 converter->SetWriteImagesInSeparateFile(this->m_WriteImagesInSeparateFile);
122 return converter->SpatialObjectToMetaObject(so.
GetPointer());
124 template <
typename TConverter>
127 typename TConverter::Pointer converter = TConverter::New();
128 return converter->MetaObjectToSpatialObject(mo);
130 void SetTransform(MetaObject *obj, TransformType *transform);
132 void SetTransform(SpatialObjectType *so, MetaObject *obj);
134 double m_Orientation[100];
135 double m_Position[10];
136 double m_CenterOfRotation[10];
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkMetaSceneConverter.hxx"