9 #ifndef IMPEM_MRC_READER_WRITER_H
10 #define IMPEM_MRC_READER_WRITER_H
12 #include <IMP/em/em_config.h>
14 #include "internal/MRCHeader.h"
29 #if !defined(DOXYGEN) && !defined(SWIG)
31 void read(
const char *fn_in,
float **data,
DensityHeader &head)
override;
34 void write(
const char *fn_out,
const float *data,
41 void read() { read(&grid); }
43 void read(
float **pt);
47 void read_data(
float *pt);
49 void transpose_data_to_zyx(
float **pt);
51 void read_8_data(
float *pt);
53 void read_32_data(
float *pt);
54 void read_grid(
void *pt,
size_t size,
size_t n);
60 void write(
const char *fn) {
return write(fn, grid); }
67 void write(
const char *fn,
const float *pt);
72 void write_header(std::ofstream &s);
78 void write_data(std::ofstream &s,
const float *pt);
85 internal::MRCHeader header;
The base class to handle reading and writing of density maps.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
MRCReaderWriter(std::string fn)
Constructor.
An abstract class for reading a map.
MRCReaderWriter()
Empty constructor.