Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Protected Member Functions
itk::MRMLIDImageIO Class Reference

ImageIO object for reading and writing imaegs from a MRML scene. More...

#include <Libs/MRML/IDImageIO/itkMRMLIDImageIO.h>

Inheritance diagram for itk::MRMLIDImageIO:
Inheritance graph
[legend]
Collaboration diagram for itk::MRMLIDImageIO:
Collaboration graph
[legend]

Public Types

typedef SmartPointer< SelfPointer
 
typedef MRMLIDImageIO Self
 
typedef ImageIOBase Superclass
 

Public Member Functions

virtual bool CanReadFile (const char *) ITK_OVERRIDE
 
virtual bool CanUseOwnBuffer ()
 
virtual bool CanWriteFile (const char *) ITK_OVERRIDE
 
virtual void * GetOwnBuffer ()
 
 itkNewMacro (Self)
 
 itkTypeMacro (MRMLIDImageIO, ImageIOBase)
 
virtual void Read (void *buffer) ITK_OVERRIDE
 
virtual void ReadImageInformation () ITK_OVERRIDE
 
virtual void ReadUsingOwnBuffer ()
 
virtual void Write (const void *buffer) ITK_OVERRIDE
 
virtual void WriteImageInformation () ITK_OVERRIDE
 

Protected Member Functions

 MRMLIDImageIO ()
 
void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
void SetDTDictionaryValues (MetaDataDictionary &dict, vtkMRMLDiffusionImageVolumeNode *di)
 
void SetDTNodeValues (vtkMRMLDiffusionImageVolumeNode *di, MetaDataDictionary &dict)
 
void SetDWDictionaryValues (MetaDataDictionary &dict, vtkMRMLDiffusionWeightedVolumeNode *dw)
 
void SetDWNodeValues (vtkMRMLDiffusionWeightedVolumeNode *dw, MetaDataDictionary &dict)
 
virtual void WriteImageInformation (vtkMRMLVolumeNode *, vtkImageData *, int *scalarType, int *numberOfScalarComponents)
 
 ~MRMLIDImageIO ()
 

Detailed Description

ImageIO object for reading and writing imaegs from a MRML scene.

MRMLIDImageIO is an ImageIO object that allows you to retrieve/store an image in a MRML node using a standard ITK ImageFileReader or ImageFileWriter. THis allows a plugin to be written once and compiled into a shared object module that Slicer can communicate with directly or compiled into a command line program that can be executed outside of Slicer. In the former, the plugin will be provided with a MRML ID for the "file" to read/write and the ImageFileReader/Writer will use the MRMLIDImageIO object to perform "IO" operations directly on a MRML scene. In the latter, the plugin will be provided with a filename for its inputs/outputs and other ITK ImageIO objects will be employed by the ImageFileReader/ImageFileWriter to read and write the data.

The "filename" specified will look like a URI: slicer:<scene id>#<node id> - local slicer slicer://<hostname>/<scene id>#<node id> - remote slicer

This code was written on the Massachusettes Turnpike with extreme glare on the LCD.

Definition at line 53 of file itkMRMLIDImageIO.h.

Member Typedef Documentation

◆ Pointer

typedef SmartPointer<Self> itk::MRMLIDImageIO::Pointer

Definition at line 59 of file itkMRMLIDImageIO.h.

◆ Self

Standard class typedefs.

Definition at line 57 of file itkMRMLIDImageIO.h.

◆ Superclass

typedef ImageIOBase itk::MRMLIDImageIO::Superclass

Definition at line 58 of file itkMRMLIDImageIO.h.

Constructor & Destructor Documentation

◆ MRMLIDImageIO()

itk::MRMLIDImageIO::MRMLIDImageIO ( )
protected

◆ ~MRMLIDImageIO()

itk::MRMLIDImageIO::~MRMLIDImageIO ( )
protected

Member Function Documentation

◆ CanReadFile()

virtual bool itk::MRMLIDImageIO::CanReadFile ( const char *  )
virtual

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

◆ CanUseOwnBuffer()

virtual bool itk::MRMLIDImageIO::CanUseOwnBuffer ( )
virtual

◆ CanWriteFile()

virtual bool itk::MRMLIDImageIO::CanWriteFile ( const char *  )
virtual

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

◆ GetOwnBuffer()

virtual void* itk::MRMLIDImageIO::GetOwnBuffer ( )
virtual

◆ itkNewMacro()

itk::MRMLIDImageIO::itkNewMacro ( Self  )

Method for creation through the object factory.

◆ itkTypeMacro()

itk::MRMLIDImageIO::itkTypeMacro ( MRMLIDImageIO  ,
ImageIOBase   
)

Run-time type information (and related methods).

◆ PrintSelf()

void itk::MRMLIDImageIO::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected

◆ Read()

virtual void itk::MRMLIDImageIO::Read ( void *  buffer)
virtual

Reads the data from disk into the memory buffer provided.

◆ ReadImageInformation()

virtual void itk::MRMLIDImageIO::ReadImageInformation ( )
virtual

Set the spacing and dimension information for the set filename.

◆ ReadUsingOwnBuffer()

virtual void itk::MRMLIDImageIO::ReadUsingOwnBuffer ( )
virtual

◆ SetDTDictionaryValues()

void itk::MRMLIDImageIO::SetDTDictionaryValues ( MetaDataDictionary &  dict,
vtkMRMLDiffusionImageVolumeNode di 
)
protected

Take information in a Slicer node and transfer it the MetaDataDictionary in ITK

◆ SetDTNodeValues()

void itk::MRMLIDImageIO::SetDTNodeValues ( vtkMRMLDiffusionImageVolumeNode di,
MetaDataDictionary &  dict 
)
protected

Take information from the MetaDataDictionary that is needed to transfer this volume to a Slicer node

◆ SetDWDictionaryValues()

void itk::MRMLIDImageIO::SetDWDictionaryValues ( MetaDataDictionary &  dict,
vtkMRMLDiffusionWeightedVolumeNode dw 
)
protected

Take information in a Slicer node and transfer it the MetaDataDictionary in ITK

◆ SetDWNodeValues()

void itk::MRMLIDImageIO::SetDWNodeValues ( vtkMRMLDiffusionWeightedVolumeNode dw,
MetaDataDictionary &  dict 
)
protected

Take information from the MetaDataDictionary that is needed to transfer this volume to a Slicer node

◆ Write()

virtual void itk::MRMLIDImageIO::Write ( const void *  buffer)
virtual

Writes the data to disk from the memory buffer provided. Make sure that the IORegion has been set properly.

◆ WriteImageInformation() [1/2]

virtual void itk::MRMLIDImageIO::WriteImageInformation ( )
virtual

Writes the header of the image. Assumes SetFileName has been called with a valid file name.

◆ WriteImageInformation() [2/2]

virtual void itk::MRMLIDImageIO::WriteImageInformation ( vtkMRMLVolumeNode ,
vtkImageData *  ,
int *  scalarType,
int *  numberOfScalarComponents 
)
protectedvirtual

Write the image information to the node and specified image


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