ITK  4.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::MRCImageIO Class Reference

An ImageIO class to read the MRC file format. The MRC file format frequently has the extension ".mrc" or ".rec". It is used frequently for electron microscopy and is an emerging standard for cryo-electron tomography and molecular imaging. The format is used to represent 2D, 3D images along with 2D tilt series for tomography. More...

#include <itkMRCImageIO.h>

Inheritance diagram for itk::MRCImageIO:
Collaboration diagram for itk::MRCImageIO:

List of all members.

Public Types

typedef SmartPointer< SelfPointer
typedef MRCImageIO Self
typedef StreamingImageIOBase Superclass

Public Member Functions

virtual bool CanReadFile (const char *)
virtual bool CanWriteFile (const char *)
virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const
virtual void Read (void *buffer)
virtual void ReadImageInformation ()
virtual void Write (const void *buffer)
virtual void WriteImageInformation (void)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

virtual SizeType GetHeaderSize (void) const

Private Member Functions

void InternalReadImageInformation (std::ifstream &is)
 MRCImageIO (const Self &)
void operator= (const Self &)
void UpdateHeaderFromImageIO (void)
void UpdateHeaderWithMinMaxMean (const void *bufferBegin)
template<typename TPixelType >
void UpdateHeaderWithMinMaxMean (const TPixelType *bufferBegin)
virtual void WriteImageInformation (const void *bufferBegin)

Private Attributes

MRCHeaderObject::Pointer m_MRCHeader
static const char * m_MetaDataHeaderName
 MRCImageIO ()
void PrintSelf (std::ostream &os, Indent indent) const

Detailed Description

An ImageIO class to read the MRC file format. The MRC file format frequently has the extension ".mrc" or ".rec". It is used frequently for electron microscopy and is an emerging standard for cryo-electron tomography and molecular imaging. The format is used to represent 2D, 3D images along with 2D tilt series for tomography.

The header of the file can contain important information which can not be represented in an Image. Therefor the header is placed into the MetaDataDictionary of "this". The key to access this is MetaDataHeaderName ( fix me when renamed ).

See also:
MRCHeaderObject MetaDataDictionary

This implementation is designed to support IO Streaming of arbitrary regions.

As with all ImageIOs this class is designed to work with ImageFileReader and ImageFileWriter, so its direct use is discouraged.

This code was contributed in the Insight Journal paper: "A Streaming IO Base Class and Support for Streaming the MRC and VTK File Format" by Lowekamp B., Chen D. http://www.insight-journal.org/browse/publication/729 http://hdl.handle.net/10380/3171

See also:
ImageFileWriter ImageFileReader ImageIOBase

Definition at line 59 of file itkMRCImageIO.h.


Member Typedef Documentation

Reimplemented from itk::StreamingImageIOBase.

Definition at line 66 of file itkMRCImageIO.h.

Standard class typedefs.

Reimplemented from itk::StreamingImageIOBase.

Definition at line 64 of file itkMRCImageIO.h.

Reimplemented from itk::StreamingImageIOBase.

Definition at line 65 of file itkMRCImageIO.h.


Constructor & Destructor Documentation

itk::MRCImageIO::MRCImageIO ( ) [protected]
Todo:
Move to itkIOCommon with the other MetaDataDictionary keys, likely rename the symbol to something like ITK_MRCHHeader. (remember to fix class doc too)
itk::MRCImageIO::MRCImageIO ( const Self ) [private]

Member Function Documentation

virtual bool itk::MRCImageIO::CanReadFile ( const char *  ) [virtual]

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

Implements itk::ImageIOBase.

virtual bool itk::MRCImageIO::CanWriteFile ( const char *  ) [virtual]

Returns true if this ImageIO can write the specified file.

The methods verifies that the file extension is known to be supported by this class.

Implements itk::ImageIOBase.

virtual::itk::LightObject::Pointer itk::MRCImageIO::CreateAnother ( void  ) 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.

virtual SizeType itk::MRCImageIO::GetHeaderSize ( void  ) const [protected, virtual]

Overloaded to return the actually header size of the file specified. The header must be read before this methods is called.

Implements itk::StreamingImageIOBase.

virtual const char* itk::MRCImageIO::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::StreamingImageIOBase.

void itk::MRCImageIO::InternalReadImageInformation ( std::ifstream &  is) [private]
static Pointer itk::MRCImageIO::New ( ) [static]

Method for creation through the object factory.

Reimplemented from itk::LightProcessObject.

void itk::MRCImageIO::operator= ( const Self ) [private]

This method causes the filter to generate its output.

Reimplemented from itk::StreamingImageIOBase.

void itk::MRCImageIO::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]
Todo:
Move to itkIOCommon with the other MetaDataDictionary keys, likely rename the symbol to something like ITK_MRCHHeader. (remember to fix class doc too)

Reimplemented from itk::StreamingImageIOBase.

virtual void itk::MRCImageIO::Read ( void *  buffer) [virtual]

Reads the data from disk into the memory buffer provided.

Implements itk::ImageIOBase.

virtual void itk::MRCImageIO::ReadImageInformation ( ) [virtual]

Read the spacing and dimentions of the image. Assumes SetFileName has been called with a valid file name.

Implements itk::ImageIOBase.

void itk::MRCImageIO::UpdateHeaderFromImageIO ( void  ) [private]
template<typename TPixelType >
void itk::MRCImageIO::UpdateHeaderWithMinMaxMean ( const TPixelType *  bufferBegin) [inline, private]

Definition at line 126 of file itkMRCImageIO.h.

References itk::min_max_element().

void itk::MRCImageIO::UpdateHeaderWithMinMaxMean ( const void *  bufferBegin) [private]
virtual void itk::MRCImageIO::Write ( const void *  buffer) [virtual]

Writes the data to disk from the memory buffer provided. Make sure that the IORegions has been set properly. The buffer is cast to a pointer to the beginning of the image data.

Implements itk::ImageIOBase.

virtual void itk::MRCImageIO::WriteImageInformation ( void  ) [inline, virtual]

Writes the spacing and dimentions of the image. Assumes SetFileName has been called with a valid file name.

Implements itk::ImageIOBase.

Definition at line 75 of file itkMRCImageIO.h.

virtual void itk::MRCImageIO::WriteImageInformation ( const void *  bufferBegin) [private, virtual]

Member Data Documentation

Todo:
Move to itkIOCommon with the other MetaDataDictionary keys, likely rename the symbol to something like ITK_MRCHHeader. (remember to fix class doc too)

Definition at line 105 of file itkMRCImageIO.h.

Definition at line 156 of file itkMRCImageIO.h.


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