#include <salio.h>
Inheritance diagram for EMAN::SalIO:
Public Member Functions | |
SalIO (const string &filename, IOMode rw_mode=READ_ONLY) | |
~SalIO () | |
Static Public Member Functions | |
static bool | is_valid (const void *first_block) |
Public Attributes | |
DEFINE_IMAGEIO_FUNC | |
Private Types | |
X_SCAN_AXIS | |
Y_SCAN_AXIS | |
NON_RASTER_SCAN | |
RASTER_SCAN | |
enum | ScanAxis { X_SCAN_AXIS, Y_SCAN_AXIS } |
enum | ScanMode { NON_RASTER_SCAN, RASTER_SCAN } |
Private Attributes | |
string | filename |
IOMode | rw_mode |
FILE * | sal_file |
bool | initialized |
int | nx |
int | ny |
int | record_length |
ScanMode | scan_mode |
float | pixel |
Static Private Attributes | |
static const char * | HDR_EXT = "hdr" |
static const char * | IMG_EXT = "img" |
static const char * | MAGIC = " IDENTIFICATION" |
A SAL image consists of 2 files: 1 header file "X.hdr" and a data file "X.img". Header file is in ASCII format. Data file is in binary format.
Each pair of hdr/img SAL files contains 1 2D image.
Definition at line 51 of file salio.h.
enum EMAN::SalIO::ScanAxis [private] |
enum EMAN::SalIO::ScanMode [private] |
SalIO::SalIO | ( | const string & | filename, | |
IOMode | rw_mode = READ_ONLY | |||
) | [explicit] |
Definition at line 57 of file salio.cpp.
References NON_RASTER_SCAN, nx, ny, pixel, record_length, and scan_mode.
00058 : filename(file), rw_mode(rw), sal_file(0), initialized(false) 00059 { 00060 nx = 0; 00061 ny = 0; 00062 record_length = 512; 00063 scan_mode = NON_RASTER_SCAN; 00064 pixel = 4.6667f; 00065 }
SalIO::~SalIO | ( | ) |
bool SalIO::is_valid | ( | const void * | first_block | ) | [static] |
Definition at line 145 of file salio.cpp.
References EMAN::Util::check_file_by_magic(), ENTERFUNC, EXITFUNC, and MAGIC.
Referenced by EMAN::EMUtil::fast_get_image_type(), and EMAN::EMUtil::get_image_type().
00146 { 00147 ENTERFUNC; 00148 bool result = false; 00149 00150 if (!first_block) { 00151 result = false; 00152 } 00153 result = Util::check_file_by_magic(first_block, MAGIC); 00154 EXITFUNC; 00155 return result; 00156 }
string EMAN::SalIO::filename [private] |
const char * SalIO::HDR_EXT = "hdr" [static, private] |
const char * SalIO::IMG_EXT = "img" [static, private] |
bool EMAN::SalIO::initialized [private] |
const char * SalIO::MAGIC = " IDENTIFICATION" [static, private] |
int EMAN::SalIO::nx [private] |
int EMAN::SalIO::ny [private] |
float EMAN::SalIO::pixel [private] |
int EMAN::SalIO::record_length [private] |
IOMode EMAN::SalIO::rw_mode [private] |
FILE* EMAN::SalIO::sal_file [private] |
ScanMode EMAN::SalIO::scan_mode [private] |