IMP  2.2.0
The Integrative Modeling Platform
IMP::em::EMReaderWriter Class Reference

#include <IMP/em/EMReaderWriter.h>

+ Inheritance diagram for IMP::em::EMReaderWriter:

Public Member Functions

virtual std::string get_type_name () const
 
virtual ::IMP::base::VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
void read (const char *filename, float **data, DensityHeader &header)
 Reads a density file in EM format and stores the information. More...
 
void write (const char *filename, const float *data, const DensityHeader &header)
 Writes a density file in EM format with the header information. More...
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual void do_destroy ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Protected Member Functions

void read_data (std::ifstream &file, float **data, const internal::EMHeader &header)
 Reads the data. More...
 
void read_header (std::ifstream &file, internal::EMHeader &header)
 
void write_header (std::ostream &s, const internal::EMHeader &header)
 Writes the header. More...
 
- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

Detailed Description

Reader/writer for EM.

Definition at line 20 of file EMReaderWriter.h.

Member Function Documentation

void IMP::em::EMReaderWriter::read ( const char *  filename,
float **  data,
DensityHeader header 
)
virtual
Parameters
[in]filenamename of the file to read
[in]datapointer to the data
[in]headerDensityHeader() to store the header information
Exceptions
IOExceptionin case that the filename was not found

Reimplemented from IMP::em::MapReaderWriter.

void IMP::em::EMReaderWriter::read_data ( std::ifstream &  file,
float **  data,
const internal::EMHeader &  header 
)
protected
Parameters
fileifstream of the file to read
datapointer to store the data
headerinternal::EMHeader to store the header information
Exceptions
IOExceptionif the data allocation had failed
IOExceptionis the requested data type is not implemented
void IMP::em::EMReaderWriter::read_header ( std::ifstream &  file,
internal::EMHeader &  header 
)
protected

Reads the header Reads the data

Parameters
fileifstream of the file to read
headerinternal::EMHeader to store the header information
void IMP::em::EMReaderWriter::write ( const char *  filename,
const float *  data,
const DensityHeader header 
)
virtual
Parameters
[in]filenamename of the file to read
[in]datapointer to the data
[in]headerDensityHeader() with the header information

Reimplemented from IMP::em::MapReaderWriter.

void IMP::em::EMReaderWriter::write_header ( std::ostream &  s,
const internal::EMHeader &  header 
)
protected
Parameters
[in]s
[in]headerinternal::EMHeader with the header information
Exceptions
IOExceptionif the writing operation had failed.

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