32#ifndef eman__mrcio_h__
33#define eman__mrcio_h__ 1
55 static bool is_valid(
const void *first_block, off_t file_size = 0);
301 static void check_swap(
const int * data,
const char * filnam,
bool show_errors,
302 bool & do_swap,
bool & have_err);
308 int transpose(
float *data,
int nx,
int ny,
int nz)
const;
Ctf is the base class for all CTF model.
Dict is a dictionary to store <string, EMObject> pair.
ImageIO classes are designed for reading/writing various electron micrography image formats,...
MRC file = header + data (nx x ny x nz).
MrcIO(const string &fname, IOMode rw_mode=READ_ONLY)
static const char * CTF_MAGIC
int get_nimg()
Return the number of images in this image file.
static void check_swap(const int *data, const char *filnam, bool show_errors, bool &do_swap, bool &have_err)
This is a utility routine to tell whether to byte swap MRC header.
int read_fei_header(Dict &dict, int image_index=0, const Region *area=0, bool is_3d=false)
static const char * SHORT_CTF_MAGIC
int transpose(float *data, int nx, int ny, int nz) const
static bool is_valid(const void *first_block, off_t file_size=0)
static int generate_machine_stamp()
generate the machine stamp used in MRC image format.
bool use_given_dimensions
void write_ctf(const Ctf &ctf, int image_index=0)
Write CTF data to this image.
int read_mrc_header(Dict &dict, int image_index=0, const Region *area=0, bool is_3d=false)
static int to_em_datatype(int mrcmode)
void swap_header(MrcHeader &mrch)
static int get_mode_size(int mm)
void update_stats(void *data, size_t size)
This is a utility function used to calculate new min/max/mean/sigma when write MRC file as 16 bit or ...
static int to_mrcmode(int em_datatype, int is_complex)
int read_ctf(Ctf &ctf, int image_index=0)
Read CTF data from this image.
Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes...