/* * mrc.h * * Read the MRC tomography format * * (c) 2007 Thomas White * * dtr - Diffraction Tomography Reconstruction * */ #ifdef HAVE_CONFIG_H #include #endif #ifndef MRC_H #define MRC_H #include #include "control.h" typedef struct struct_mrcheader { int32_t nx; int32_t ny; int32_t nz; int32_t mode; int32_t nxstart; int32_t nystart; int32_t nzstart; int32_t mx; int32_t my; int32_t mz; float xlen; float ylen; float zlen; float alpha; float beta; float gamma; int32_t mapc; int32_t mapr; int32_t maps; float amin; float amax; float amean; uint16_t ispg; /* Space group number */ uint16_t nsymbt; int32_t next; uint16_t dvid; char extra[30]; uint16_t numintegers; uint16_t numfloats; uint16_t sub; uint16_t zfac; float min2; float max2; float min3; float max3; float min4; float max4; uint16_t idtype; uint16_t lens; uint16_t nd1; uint16_t nd2; uint16_t vd1; uint16_t vd2; float tiltangles[9]; float zorg; float xorg; float yorg; int32_t nlabl; char data[10][80]; } MRCHeader; typedef struct struct_mrcextheader { float a_tilt; float b_tilt; float x_stage; float y_stage; float z_stage; float x_shift; float y_shift; float defocus; float exp_time; float mean_int; float tilt_axis; float pixel_size; float magnification; float mic_type; float gun_type; float d_number; float voltage; float focus_spread; float mtf; float df_start; float focus_step; float dac_setting; float cs; float semi_conv; float info_limit; float num_images; float num_in_series; float coma1; float coma2; float astig21; float astig22; float astig31; float astig32; float cam_type; float cam_pos; float padding[64]; /* Need to guarantee that reading an extended header (of any size) will never write beyond the boundary of this structure... */ } MRCExtHeader; extern int mrc_read(ControlContext *ctx); extern unsigned int mrc_is_mrcfile(const char *filename); #endif /* MRC_H */