18 #ifndef itkMetaSceneConverter_h
19 #define itkMetaSceneConverter_h
24 #include "metaScene.h"
44 template<
unsigned int NDimensions = 3,
45 typename PixelType =
unsigned char,
46 typename TMeshTraits =
47 DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >
78 bool WriteMeta(
SceneType *scene,
const std::string & fileName,
79 unsigned int depth = SceneType::MaximumDepth,
80 const std::string & spatialObjectTypeName =
"");
86 itkSetMacro( BinaryPoints,
bool );
87 itkGetMacro( BinaryPoints,
bool );
91 itkSetMacro( TransformPrecision,
unsigned int );
92 itkGetMacro( TransformPrecision,
unsigned int );
96 itkSetMacro( WriteImagesInSeparateFile,
bool );
97 itkGetConstMacro( WriteImagesInSeparateFile,
bool );
106 void RegisterMetaConverter(
const std::string & metaTypeName,
107 const std::string & spatialObjectTypeName,
110 MetaScene * CreateMetaScene(
SceneType *scene,
111 unsigned int depth = SceneType::MaximumDepth,
112 const std::string & name =
"");
114 ScenePointer CreateSpatialObjectScene(MetaScene *scene);
129 template <
typename TConverter>
132 typename TConverter::Pointer converter = TConverter::New();
134 converter->SetWriteImagesInSeparateFile(this->m_WriteImagesInSeparateFile);
135 return converter->SpatialObjectToMetaObject(so);
137 template <
typename TConverter>
140 typename TConverter::Pointer converter = TConverter::New();
141 return converter->MetaObjectToSpatialObject(mo);
143 void SetTransform(MetaObject *obj,
const TransformType * transform);
145 void SetTransform(SpatialObjectType *so,
const MetaObject * meta);
147 double m_Orientation[100];
148 double m_Position[10];
149 double m_CenterOfRotation[10];
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkMetaSceneConverter.hxx"
Light weight base class for most itk classes.
Implementation of the composite pattern.
Representation of a group based on the spatial object classes.
Base class for most ITK classes.