ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes
itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits > Class Template Reference

#include <itkMetaSceneConverter.h>

+ Collaboration diagram for itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >:

List of all members.

Public Types

typedef std::map< std::string,
MetaConverterPointer
ConverterMapType
typedef MetaConverterBase
< NDimensions > 
MetaConverterBaseType
typedef
MetaConverterBaseType::Pointer 
MetaConverterPointer
typedef SceneType::Pointer ScenePointer
typedef
itk::SceneSpatialObject
< NDimensions > 
SceneType

Public Member Functions

MetaScene * CreateMetaScene (SceneType *scene, unsigned int depth=MaximumDepth, char *name=NULL)
ScenePointer CreateSpatialObjectScene (MetaScene *scene)
const MetaEventGetEvent () const
 MetaSceneConverter ()
ScenePointer ReadMeta (const char *name)
void RegisterMetaConverter (const char *metaTypeName, const char *spatialObjectTypeName, MetaConverterBaseType *converter)
void SetBinaryPoints (bool binary)
void SetEvent (MetaEvent *event)
void SetWriteImagesInSeparateFile (bool separate)
bool WriteMeta (SceneType *scene, const char *fileName, unsigned int depth=MaximumDepth, char *spatialObjectTypeName=NULL)
 ~MetaSceneConverter ()
void SetTransformPrecision (unsigned int precision)
unsigned int GetTransformPrecision ()

Static Public Attributes

static const unsigned int MaximumDepth = 9999999

Private Types

typedef std::list< MetaObject * > MetaObjectListType
typedef SpatialObjectType::Pointer SpatialObjectPointer
typedef itk::SpatialObject
< NDimensions > 
SpatialObjectType
typedef
SpatialObjectType::TransformType 
TransformType

Private Member Functions

template<typename TConverter >
SpatialObjectPointer MetaObjectToSpatialObject (const MetaObject *mo)
void SetTransform (MetaObject *obj, TransformType *transform)
void SetTransform (SpatialObjectType *so, MetaObject *obj)
template<typename TConverter >
MetaObject * SpatialObjectToMetaObject (SpatialObjectPointer &so)

Private Attributes

bool m_BinaryPoints
double m_CenterOfRotation [10]
ConverterMapType m_ConverterMap
MetaEventm_Event
double m_Orientation [100]
double m_Position [10]
unsigned int m_TransformPrecision
bool m_WriteImagesInSeparateFile

Detailed Description

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
class itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >

Converts between MetaObject and SpaitalObject scenes.

SpatialObject hierarchies are written to disk using the MetaIO library. This class is responsible for converting between MetaIO scenes and SpatialObject scenes

See also:
MetaConverterBase

Definition at line 46 of file itkMetaSceneConverter.h.


Member Typedef Documentation

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef std::map< std::string, MetaConverterPointer > itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::ConverterMapType

Definition at line 57 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef MetaConverterBase< NDimensions > itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MetaConverterBaseType

Typedef for auxiliary conversion classes

Definition at line 55 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef MetaConverterBaseType::Pointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MetaConverterPointer

Definition at line 56 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef std::list< MetaObject * > itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MetaObjectListType [private]

Definition at line 113 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef SceneType::Pointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::ScenePointer

Definition at line 52 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef itk::SceneSpatialObject< NDimensions > itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SceneType

SpatialObject Scene types

Definition at line 51 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef SpatialObjectType::Pointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SpatialObjectPointer [private]

Definition at line 110 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef itk::SpatialObject< NDimensions > itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SpatialObjectType [private]

Definition at line 109 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
typedef SpatialObjectType::TransformType itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::TransformType [private]

Definition at line 111 of file itkMetaSceneConverter.h.


Constructor & Destructor Documentation

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MetaSceneConverter ( )
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::~MetaSceneConverter ( )

Member Function Documentation

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
MetaScene* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateMetaScene ( SceneType scene,
unsigned int  depth = MaximumDepth,
char *  name = NULL 
)
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
ScenePointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateSpatialObjectScene ( MetaScene *  scene)
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
const MetaEvent* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetEvent ( ) const [inline]

Definition at line 72 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
unsigned int itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetTransformPrecision ( ) [inline]

set/get the precision for writing out numbers as plain text

Definition at line 83 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
template<typename TConverter >
SpatialObjectPointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MetaObjectToSpatialObject ( const MetaObject *  mo) [inline, private]

Definition at line 124 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
ScenePointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::ReadMeta ( const char *  name)

Read a MetaFile and create a Scene SpatialObject

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::RegisterMetaConverter ( const char *  metaTypeName,
const char *  spatialObjectTypeName,
MetaConverterBaseType converter 
)

add new SpatialObject/MetaObject converters at runtime

Every Converter is mapped to both a metaObject type name and a spatialObject type name -- these need to match what gets read from & written to the MetaIO file

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetBinaryPoints ( bool  binary) [inline]

Set if the points should be saved in binary/ASCII

Definition at line 76 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetEvent ( MetaEvent event) [inline]

Definition at line 73 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransform ( MetaObject *  obj,
TransformType transform 
) [private]
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransform ( SpatialObjectType so,
MetaObject *  obj 
) [private]
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransformPrecision ( unsigned int  precision) [inline]

set/get the precision for writing out numbers as plain text

Definition at line 79 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetWriteImagesInSeparateFile ( bool  separate) [inline]

Set if the images should be written in different files

Definition at line 87 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
template<typename TConverter >
MetaObject* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SpatialObjectToMetaObject ( SpatialObjectPointer so) [inline, private]
template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::WriteMeta ( SceneType scene,
const char *  fileName,
unsigned int  depth = MaximumDepth,
char *  spatialObjectTypeName = NULL 
)

write out a Scene SpatialObject


Member Data Documentation

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_BinaryPoints [private]

Definition at line 138 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
double itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_CenterOfRotation[10] [private]

Definition at line 135 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
ConverterMapType itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_ConverterMap [private]

Definition at line 141 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
MetaEvent* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_Event [private]

Definition at line 137 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
double itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_Orientation[100] [private]

Definition at line 133 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
double itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_Position[10] [private]

Definition at line 134 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
unsigned int itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_TransformPrecision [private]

Definition at line 140 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::m_WriteImagesInSeparateFile [private]

Definition at line 139 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
const unsigned int itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::MaximumDepth = 9999999 [static]

Definition at line 62 of file itkMetaSceneConverter.h.


The documentation for this class was generated from the following file: