#include <fitsio.h>
Inheritance diagram for EMAN::FitsIO:
Public Member Functions | |
FitsIO (const string &filename, IOMode rw_mode=READ_ONLY) | |
~FitsIO () | |
int | read_ctf (Ctf &ctf, int image_index=0) |
Read CTF data from this image. | |
void | write_ctf (const Ctf &ctf, int image_index=0) |
Write CTF data to this image. | |
Static Public Member Functions | |
static bool | is_valid (const void *first_block, off_t file_size=0) |
static int | get_mode_size (int mm) |
static int | to_em_datatype (int mrcmode) |
static int | to_mrcmode (int em_datatype, int is_complex) |
Public Attributes | |
DEFINE_IMAGEIO_FUNC | |
Private Attributes | |
string | filename |
IOMode | rw_mode |
FILE * | fitsfile |
bool | is_big_endian |
bool | is_new_file |
bool | initialized |
int | dstart |
int | dtype |
int | nx |
int | ny |
int | nz |
A MRC image file stores 1D, 2D or 3D image. The image's dimensions and pixel type are defined in the header.
Definition at line 48 of file fitsio.h.
FitsIO::FitsIO | ( | const string & | filename, | |
IOMode | rw_mode = READ_ONLY | |||
) | [explicit] |
Definition at line 45 of file fitsio.cpp.
References fitsfile, initialized, is_big_endian, EMAN::ByteOrder::is_host_big_endian(), and is_new_file.
00046 : filename(fits_filename), rw_mode(rw) 00047 { 00048 is_big_endian = ByteOrder::is_host_big_endian(); 00049 is_new_file = false; 00050 initialized = false; 00051 fitsfile=0; 00052 }
FitsIO::~FitsIO | ( | ) |
static int EMAN::FitsIO::get_mode_size | ( | int | mm | ) | [static] |
bool FitsIO::is_valid | ( | const void * | first_block, | |
off_t | file_size = 0 | |||
) | [static] |
Definition at line 83 of file fitsio.cpp.
References ENTERFUNC, and EXITFUNC.
Referenced by EMAN::EMUtil::get_image_type().
00084 { 00085 ENTERFUNC; 00086 00087 if (!first_block) { 00088 return false; 00089 } 00090 00091 if (strncmp("SIMPLE ",(const char *)first_block,8)==0) return true; 00092 00093 EXITFUNC; 00094 return false; 00095 }
int FitsIO::read_ctf | ( | Ctf & | ctf, | |
int | image_index = 0 | |||
) | [virtual] |
Read CTF data from this image.
ctf | Used to store the CTF data. | |
image_index | The index of the image to read. |
Reimplemented from EMAN::ImageIO.
Definition at line 236 of file fitsio.cpp.
References ENTERFUNC, EXITFUNC, and EMAN::ImageIO::init().
static int EMAN::FitsIO::to_em_datatype | ( | int | mrcmode | ) | [static] |
static int EMAN::FitsIO::to_mrcmode | ( | int | em_datatype, | |
int | is_complex | |||
) | [static] |
void FitsIO::write_ctf | ( | const Ctf & | ctf, | |
int | image_index = 0 | |||
) | [virtual] |
Write CTF data to this image.
ctf | Ctf instance storing the CTF data. | |
image_index | The index of the image to write. |
Reimplemented from EMAN::ImageIO.
Definition at line 244 of file fitsio.cpp.
References ENTERFUNC, EXITFUNC, and EMAN::ImageIO::init().
int EMAN::FitsIO::dstart [private] |
int EMAN::FitsIO::dtype [private] |
string EMAN::FitsIO::filename [private] |
FILE* EMAN::FitsIO::fitsfile [private] |
bool EMAN::FitsIO::initialized [private] |
bool EMAN::FitsIO::is_big_endian [private] |
bool EMAN::FitsIO::is_new_file [private] |
int EMAN::FitsIO::nx [private] |
int EMAN::FitsIO::ny [private] |
int EMAN::FitsIO::nz [private] |
IOMode EMAN::FitsIO::rw_mode [private] |