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 = ITK_NULLPTR);
81 m_TransformPrecision = precision;
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,
104 char *name = ITK_NULLPTR);
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"
ObjectType * GetPointer() const
a SceneSpatialObject has a list of SpatialObjects
Implementation of the composite pattern.