ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::WasmTransformIOTemplate< TParametersValueType > Class Template Reference

#include <itkWasmTransformIO.h>

Detailed Description

template<typename TParametersValueType>
class itk::WasmTransformIOTemplate< TParametersValueType >

Read and write the an itk::Transform in a format for interfacing in WebAssembly (Wasm).

This format is intended to facilitate data exchange in ITK-Wasm. It reads and writes an ITK-Wasm Transform object where TypedArrays are replaced by binary files on the filesystem or in a CBOR file.

The file extensions used are .iwt and .iwt.cbor.

Definition at line 45 of file itkWasmTransformIO.h.

+ Inheritance diagram for itk::WasmTransformIOTemplate< TParametersValueType >:
+ Collaboration diagram for itk::WasmTransformIOTemplate< TParametersValueType >:

Public Types

using ConstTransformListType = typename TransformIOBaseTemplate<ParametersValueType>::ConstTransformListType
 
using FixedParametersType = typename TransformType::FixedParametersType
 
using FixedParametersValueType = typename TransformType::FixedParametersValueType
 
using ParametersType = typename TransformType::ParametersType
 
using ParametersValueType = typename TransformType::ParametersValueType
 
using Pointer = SmartPointer<Self>
 
using Self = WasmTransformIOTemplate
 
using Superclass = TransformIOBaseTemplate<TParametersValueType>
 
using TransformListType
 
using TransformPointer
 
using TransformType
 
- Public Types inherited from itk::TransformIOBaseTemplate< TParametersValueType >
using ConstTransformListType = std::list<ConstTransformPointer>
 
using ConstTransformPointer = typename TransformType::ConstPointer
 
using FixedParametersValueType = double
 
using ParametersValueType = TParametersValueType
 
using Pointer = SmartPointer<Self>
 
using ScalarType = TParametersValueType
 
using Self = TransformIOBaseTemplate
 
using Superclass = LightProcessObject
 
using TransformListType = std::list<TransformPointer>
 
using TransformPointer = typename TransformType::Pointer
 
using TransformType = TransformBaseTemplate<ParametersValueType>
 
- Public Types inherited from itk::LightProcessObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightProcessObject
 
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

bool CanReadFile (const char *) override
 
bool CanWriteFile (const char *) override
 
virtual::itk::LightObject::Pointer CreateAnother () const
 
auto GetJSON (bool inMemory=false) -> TransformListJSON
 
virtual const char * GetNameOfClass () const
 
void Read () override
 
void SetJSON (const TransformListJSON &json, bool inMemory=false)
 
void Write () override
 
- Public Member Functions inherited from itk::TransformIOBaseTemplate< TParametersValueType >
void CorrectTransformPrecisionType (std::string &inputTransformName)
 
void CorrectTransformPrecisionType (std::string &inputTransformName)
 
void SetTransformList (ConstTransformListType &transformList)
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
TransformListType & GetTransformList ()
 
TransformListType & GetReadTransformList ()
 
ConstTransformListType & GetWriteTransformList ()
 
virtual void SetAppendMode (bool _arg)
 
virtual bool GetAppendMode () const
 
virtual void AppendModeOn ()
 
virtual void AppendModeOff ()
 
virtual void SetUseCompression (bool _arg)
 
virtual bool GetUseCompression () const
 
virtual void UseCompressionOn ()
 
virtual void UseCompressionOff ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void UpdateOutputData ()
 
void UpdateProgress (float amount)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
Command * GetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionary & GetMetaDataDictionary ()
 
const MetaDataDictionary & GetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStamp & GetTimeStamp () 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) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
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
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::TransformIOBaseTemplate< TParametersValueType >
static void CorrectTransformPrecisionType (std::string &inputTransformName)
 
- Static Public Member Functions inherited from itk::LightProcessObject
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 val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
void ReadCBOR (void *buffer=nullptr, unsigned char *cborBuffer=nullptr, vcl_size_t cborBufferLength=0)
 
void ReadFixedParameters (const TransformListJSON &json)
 
void ReadParameters (const TransformListJSON &json)
 
virtual auto ReadTransformInformation () -> const TransformListJSON
 
 WasmTransformIOTemplate ()
 
vcl_size_t WriteCBOR (const void *buffer=nullptr, unsigned char **cborBuffer=nullptr, bool allocateCBORBuffer=false)
 
void WriteFixedParameters ()
 
void WriteParameters ()
 
void WriteTransformInformation ()
 
 ~WasmTransformIOTemplate () override
 
- Protected Member Functions inherited from itk::TransformIOBaseTemplate< TParametersValueType >
void CreateTransform (TransformPointer &ptr, const std::string &ClassName)
 
std::string GetTypeNameString ()
 
std::string GetTypeNameString ()
 
void OpenStream (std::ofstream &outputStream, bool binary)
 
 TransformIOBaseTemplate ()
 
 ~TransformIOBaseTemplate () override
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
 ~LightProcessObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~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 ()
 

Protected Attributes

cbor_item_t * m_CBORRoot { nullptr }
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Additional Inherited Members

- Static Protected Member Functions inherited from itk::TransformIOBaseTemplate< TParametersValueType >
static std::string GetTypeNameString ()
 

Member Typedef Documentation

◆ ConstTransformListType

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::ConstTransformListType = typename TransformIOBaseTemplate<ParametersValueType>::ConstTransformListType

Definition at line 59 of file itkWasmTransformIO.h.

◆ FixedParametersType

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::FixedParametersType = typename TransformType::FixedParametersType

Definition at line 56 of file itkWasmTransformIO.h.

◆ FixedParametersValueType

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::FixedParametersValueType = typename TransformType::FixedParametersValueType

Definition at line 57 of file itkWasmTransformIO.h.

◆ ParametersType

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::ParametersType = typename TransformType::ParametersType

Definition at line 54 of file itkWasmTransformIO.h.

◆ ParametersValueType

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::ParametersValueType = typename TransformType::ParametersValueType

Definition at line 55 of file itkWasmTransformIO.h.

◆ Pointer

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::Pointer = SmartPointer<Self>

Definition at line 50 of file itkWasmTransformIO.h.

◆ Self

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::Self = WasmTransformIOTemplate

Definition at line 48 of file itkWasmTransformIO.h.

◆ Superclass

template<typename TParametersValueType>
using itk::WasmTransformIOTemplate< TParametersValueType >::Superclass = TransformIOBaseTemplate<TParametersValueType>

Definition at line 49 of file itkWasmTransformIO.h.

◆ TransformListType

template<typename TParametersValueType>
using itk::TransformIOBaseTemplate< TParametersValueType >::TransformListType

Definition at line 80 of file itkTransformIOBase.h.

◆ TransformPointer

template<typename TParametersValueType>
using itk::TransformIOBaseTemplate< TParametersValueType >::TransformPointer

For writing, a const transform list gets passed in, for reading, a non-const transform list is created from the file.

Definition at line 79 of file itkTransformIOBase.h.

◆ TransformType

template<typename TParametersValueType>
using itk::TransformIOBaseTemplate< TParametersValueType >::TransformType

Definition at line 74 of file itkTransformIOBase.h.

Constructor & Destructor Documentation

◆ WasmTransformIOTemplate()

template<typename TParametersValueType>
itk::WasmTransformIOTemplate< TParametersValueType >::WasmTransformIOTemplate ( )
protected

◆ ~WasmTransformIOTemplate()

template<typename TParametersValueType>
itk::WasmTransformIOTemplate< TParametersValueType >::~WasmTransformIOTemplate ( )
overrideprotected

Member Function Documentation

◆ CanReadFile()

template<typename TParametersValueType>
bool itk::WasmTransformIOTemplate< TParametersValueType >::CanReadFile ( const char * )
overridevirtual

Determine the file type. Returns true if this TransformIO can read the file specified.

Implements itk::TransformIOBaseTemplate< TParametersValueType >.

◆ CanWriteFile()

template<typename TParametersValueType>
bool itk::WasmTransformIOTemplate< TParametersValueType >::CanWriteFile ( const char * )
overridevirtual

Determine the file type. Returns true if this TransformIO can read the file specified.

Implements itk::TransformIOBaseTemplate< TParametersValueType >.

◆ CreateAnother()

template<typename TParametersValueType>
virtual::itk::LightObject::Pointer itk::WasmTransformIOTemplate< TParametersValueType >::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::LightProcessObject.

◆ GetJSON()

template<typename TParametersValueType>
auto itk::WasmTransformIOTemplate< TParametersValueType >::GetJSON ( bool inMemory = false) -> TransformListJSON

Get the JSON representation of the mesh information.

◆ GetNameOfClass()

template<typename TParametersValueType>
virtual const char * itk::WasmTransformIOTemplate< TParametersValueType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::TransformIOBaseTemplate< TParametersValueType >.

◆ New()

template<typename TParametersValueType>
static Pointer itk::WasmTransformIOTemplate< TParametersValueType >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::TransformIOBaseTemplate< TParametersValueType >.

◆ Read()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::Read ( )
overridevirtual

Reads the data from disk into the memory buffer provided.

Implements itk::TransformIOBaseTemplate< TParametersValueType >.

◆ ReadCBOR()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::ReadCBOR ( void * buffer = nullptr,
unsigned char * cborBuffer = nullptr,
vcl_size_t cborBufferLength = 0 )
protected

◆ ReadFixedParameters()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::ReadFixedParameters ( const TransformListJSON & json)
protected

◆ ReadParameters()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::ReadParameters ( const TransformListJSON & json)
protected

◆ ReadTransformInformation()

template<typename TParametersValueType>
virtual auto itk::WasmTransformIOTemplate< TParametersValueType >::ReadTransformInformation ( ) -> const TransformListJSON
protectedvirtual

◆ SetJSON()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::SetJSON ( const TransformListJSON & json,
bool inMemory = false )

Set the JSON representation of the image information.

◆ Write()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::Write ( )
overridevirtual

Writes the transform list to disk.

Implements itk::TransformIOBaseTemplate< TParametersValueType >.

◆ WriteCBOR()

template<typename TParametersValueType>
vcl_size_t itk::WasmTransformIOTemplate< TParametersValueType >::WriteCBOR ( const void * buffer = nullptr,
unsigned char ** cborBuffer = nullptr,
bool allocateCBORBuffer = false )
protected

◆ WriteFixedParameters()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::WriteFixedParameters ( )
protected

◆ WriteParameters()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::WriteParameters ( )
protected

◆ WriteTransformInformation()

template<typename TParametersValueType>
void itk::WasmTransformIOTemplate< TParametersValueType >::WriteTransformInformation ( )
protected

Member Data Documentation

◆ m_CBORRoot

template<typename TParametersValueType>
cbor_item_t* itk::WasmTransformIOTemplate< TParametersValueType >::m_CBORRoot { nullptr }
protected

Definition at line 117 of file itkWasmTransformIO.h.


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