IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
IMP::em::EMReaderWriter Class Reference

#include <IMP/em/EMReaderWriter.h>

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

Detailed Description

Reader/writer for EM.

Definition at line 20 of file EMReaderWriter.h.

Public Member Functions

virtual std::string get_type_name () const override
 
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object. More...
 
void read (const char *filename, float **data, DensityHeader &header) override
 Reads a density file in EM format and stores the information. More...
 
void write (const char *filename, const float *data, const DensityHeader &header) override
 Writes a density file in EM format with the header information. More...
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
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::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Member Function Documentation

virtual ::IMP::VersionInfo IMP::em::EMReaderWriter::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::em::MapReaderWriter.

Definition at line 68 of file EMReaderWriter.h.

void IMP::em::EMReaderWriter::read ( const char *  filename,
float **  data,
DensityHeader header 
)
overridevirtual

Reads a density file in EM format and stores the information.

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

Reads the data.

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 
)
overridevirtual

Writes a density file in EM format with the header information.

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

Writes the header.

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: