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);
115 template <
typename TConverter>
118 typename TConverter::Pointer converter = TConverter::New();
120 converter->SetWriteImagesInSeparateFile(this->m_WriteImagesInSeparateFile);
121 return converter->SpatialObjectToMetaObject(so.
GetPointer());
123 template <
typename TConverter>
126 typename TConverter::Pointer converter = TConverter::New();
127 return converter->MetaObjectToSpatialObject(mo);
129 void SetTransform(MetaObject *obj,
TransformType *transform);
131 void SetTransform(SpatialObjectType *so, MetaObject *obj);
133 double m_Orientation[100];
134 double m_Position[10];
135 double m_CenterOfRotation[10];
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkMetaSceneConverter.hxx"