Slicer  5.0
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

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

Protected Member Functions

 MRMLIDImageIO ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void RequestModified (vtkMRMLNode *modifiedObject)
 
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 () override
 

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 54 of file itkMRMLIDImageIO.h.

Member Typedef Documentation

◆ Pointer

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

Definition at line 60 of file itkMRMLIDImageIO.h.

◆ Self

Standard class typedefs.

Definition at line 58 of file itkMRMLIDImageIO.h.

◆ Superclass

typedef ImageIOBase itk::MRMLIDImageIO::Superclass

Definition at line 59 of file itkMRMLIDImageIO.h.

Constructor & Destructor Documentation

◆ MRMLIDImageIO()

itk::MRMLIDImageIO::MRMLIDImageIO ( )
protected

◆ ~MRMLIDImageIO()

itk::MRMLIDImageIO::~MRMLIDImageIO ( )
overrideprotected

Member Function Documentation

◆ CanReadFile()

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

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

◆ CanUseOwnBuffer()

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

◆ CanWriteFile()

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

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
overrideprotected

◆ Read()

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

Reads the data from disk into the memory buffer provided.

◆ ReadImageInformation()

void itk::MRMLIDImageIO::ReadImageInformation ( )
override

Set the spacing and dimension information for the set filename.

◆ ReadUsingOwnBuffer()

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

◆ RequestModified()

void itk::MRMLIDImageIO::RequestModified ( vtkMRMLNode modifiedObject)
protected

◆ 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()

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

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

◆ WriteImageInformation() [1/2]

void itk::MRMLIDImageIO::WriteImageInformation ( )
override

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: