ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits > Class Template Reference

#include <itkMetaSceneConverter.h>

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

Detailed Description

template<unsigned int NDimensions = 3, 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 49 of file itkMetaSceneConverter.h.

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ConverterMapType = std::map< std::string, MetaConverterPointer >
 
using MetaConverterBaseType = MetaConverterBase< NDimensions >
 
using MetaConverterPointer = typename MetaConverterBaseType::Pointer
 
using Pointer = SmartPointer< Self >
 
using ScenePointer = typename SceneType::Pointer
 
using SceneType = itk::GroupSpatialObject< NDimensions >
 
using Self = MetaSceneConverter
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
MetaScene * CreateMetaScene (SceneType *scene, unsigned int depth=SceneType::MaximumDepth, const std::string &name="")
 
ScenePointer CreateSpatialObjectScene (MetaScene *scene)
 
virtual MetaEventGetEvent ()
 
virtual const char * GetNameOfClass () const
 
ScenePointer ReadMeta (const std::string &name)
 
void RegisterMetaConverter (const std::string &metaTypeName, const std::string &spatialObjectTypeName, MetaConverterBaseType *converter)
 
virtual void SetEvent (MetaEvent *_arg)
 
bool WriteMeta (SceneType *scene, const std::string &fileName, unsigned int depth=SceneType::MaximumDepth, const std::string &spatialObjectTypeName="")
 
virtual void SetBinaryPoints (bool _arg)
 
virtual bool GetBinaryPoints ()
 
virtual void SetTransformPrecision (unsigned int _arg)
 
virtual unsigned int GetTransformPrecision ()
 
virtual void SetWriteImagesInSeparateFile (bool _arg)
 
virtual bool GetWriteImagesInSeparateFile () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexceptoverride
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 MetaSceneConverter ()
 
 ~MetaSceneConverter ()=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &time)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Types

using MetaObjectListType = std::list< MetaObject * >
 
using SpatialObjectPointer = typename SpatialObjectType::Pointer
 
using SpatialObjectType = itk::SpatialObject< NDimensions >
 
using TransformType = typename SpatialObjectType::TransformType
 

Private Member Functions

template<typename TConverter >
SpatialObjectPointer MetaObjectToSpatialObject (const MetaObject *mo)
 
void SetTransform (MetaObject *obj, const TransformType *transform)
 
void SetTransform (SpatialObjectType *so, const MetaObject *meta)
 
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
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Member Typedef Documentation

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::ConstPointer = SmartPointer< const Self >

Definition at line 58 of file itkMetaSceneConverter.h.

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

Definition at line 72 of file itkMetaSceneConverter.h.

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

Typedef for auxiliary conversion classes

Definition at line 70 of file itkMetaSceneConverter.h.

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

Definition at line 71 of file itkMetaSceneConverter.h.

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

Definition at line 127 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::Pointer = SmartPointer< Self >

Definition at line 57 of file itkMetaSceneConverter.h.

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

Definition at line 67 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SceneType = itk::GroupSpatialObject< NDimensions >

SpatialObject Scene types

Definition at line 66 of file itkMetaSceneConverter.h.

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

standard class type alias

Definition at line 55 of file itkMetaSceneConverter.h.

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

Definition at line 124 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SpatialObjectType = itk::SpatialObject< NDimensions >
private

Definition at line 123 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::Superclass = Object

Definition at line 56 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
using itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::TransformType = typename SpatialObjectType::TransformType
private

Definition at line 125 of file itkMetaSceneConverter.h.

Constructor & Destructor Documentation

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

Member Function Documentation

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual::itk::LightObject::Pointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
MetaScene* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateMetaScene ( SceneType scene,
unsigned int  depth = SceneType::MaximumDepth,
const std::string &  name = "" 
)
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
ScenePointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateSpatialObjectScene ( MetaScene *  scene)
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetBinaryPoints ( )
virtual

Set if the points should be saved in binary/ASCII

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual MetaEvent* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetEvent ( )
virtual
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual const char* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

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

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

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::GetWriteImagesInSeparateFile ( ) const
virtual

Set if the images should be written in different files

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

Definition at line 138 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
static Pointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::New ( )
static
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
ScenePointer itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::ReadMeta ( const std::string &  name)

Read a MetaFile and create a Scene SpatialObject

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::RegisterMetaConverter ( const std::string &  metaTypeName,
const std::string &  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 = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetBinaryPoints ( bool  _arg)
virtual

Set if the points should be saved in binary/ASCII

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetEvent ( MetaEvent _arg)
virtual
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransform ( MetaObject *  obj,
const TransformType transform 
)
private
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransform ( SpatialObjectType so,
const MetaObject *  meta 
)
private
template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetTransformPrecision ( unsigned int  _arg)
virtual

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

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
virtual void itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SetWriteImagesInSeparateFile ( bool  _arg)
virtual

Set if the images should be written in different files

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
template<typename TConverter >
MetaObject* itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::SpatialObjectToMetaObject ( SpatialObjectPointer so)
inlineprivate

Definition at line 130 of file itkMetaSceneConverter.h.

template<unsigned int NDimensions = 3, typename PixelType = unsigned char, typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >>
bool itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::WriteMeta ( SceneType scene,
const std::string &  fileName,
unsigned int  depth = SceneType::MaximumDepth,
const std::string &  spatialObjectTypeName = "" 
)

write out a Scene SpatialObject

Member Data Documentation

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

Definition at line 152 of file itkMetaSceneConverter.h.

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

Definition at line 149 of file itkMetaSceneConverter.h.

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

Definition at line 155 of file itkMetaSceneConverter.h.

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

Definition at line 151 of file itkMetaSceneConverter.h.

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

Definition at line 147 of file itkMetaSceneConverter.h.

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

Definition at line 148 of file itkMetaSceneConverter.h.

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

Definition at line 154 of file itkMetaSceneConverter.h.

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

Definition at line 153 of file itkMetaSceneConverter.h.


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