IMP logo

IMP::em::SpiderImageReaderWriter< T > Class Template Reference


Detailed Description

template<typename T>
class IMP::em::SpiderImageReaderWriter< T >

Class to read EM images in Spider and Xmipp formats. They are stored in the header and data passed as arguments
Note:
Compatible with Xmipp and Spider formats (byte, int, float, complex)

An ImageHeader class is expected.

Inherits IMP::em::ImageReaderWriter<T>.


Public Member Functions

void read (String filename, ImageHeader &header, algebra::Matrix2D< T > &data)
void read_from_floats (String filename, ImageHeader &header, algebra::Matrix2D< T > &data)
 SpiderImageReaderWriter (String filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings)
 Full constructor.
 SpiderImageReaderWriter ()
void write (String filename, ImageHeader &header, algebra::Matrix2D< T > &data)
 Writes an EM image in Spider format.
void write_to_floats (String filename, ImageHeader &header, algebra::Matrix2D< T > &data)

Data Fields

String filename_
bool force_reversed_
bool skip_extra_checkings_
bool skip_type_check_

Constructor & Destructor Documentation

template<typename T >
IMP::em::SpiderImageReaderWriter< T >::SpiderImageReaderWriter (  ) 

Empty constructor. It does not force reversed header and does not skip any of the tests

Note:
reversed is only used in case that the type_check is skipped

template<typename T >
IMP::em::SpiderImageReaderWriter< T >::SpiderImageReaderWriter ( String  filename,
bool  skip_type_check,
bool  force_reversed,
bool  skip_extra_checkings 
)

Full constructor.

Parameters:
[in] filename file to read
[in] skip_type_check if true, the check for type of image is skipped
[in] force_reversed if true, the reverse mode is enforced for reading and writting
[in] skip_extra_checkings if true, the most stringent tests for consistency of images are skipped when reading


Member Function Documentation

template<typename T >
void IMP::em::SpiderImageReaderWriter< T >::read ( String  filename,
ImageHeader header,
algebra::Matrix2D< T > &  data 
)

Reads a image file in Spider format and stores the content the header and data parameters

Note:
: It is assumed that the image is stored as a collection of floats
Parameters:
[in] filename file to read
[in] header header to store the info
[in] data a matrix to store the grid of data of the image

Take advantage that the header format is already in Spider format and just read it

template<typename T >
void IMP::em::SpiderImageReaderWriter< T >::read_from_floats ( String  filename,
ImageHeader header,
algebra::Matrix2D< T > &  data 
)

The header format is already in Spider format, just read it

template<typename T >
void IMP::em::SpiderImageReaderWriter< T >::write ( String  filename,
ImageHeader header,
algebra::Matrix2D< T > &  data 
)

Writes an EM image in Spider format.

Parameters:
[in] filename file to write
[in] header header with the image info
[in] data a matrix with the grid of data of the image

The image header is already in Spider format, just write it

template<typename T >
void IMP::em::SpiderImageReaderWriter< T >::write_to_floats ( String  filename,
ImageHeader header,
algebra::Matrix2D< T > &  data 
)

The image header is already in Spider format, just write it


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

Generated on Mon Mar 8 23:09:01 2010 for IMP by doxygen 1.5.8