#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 | |
bool | is_valid (const void *first_block) |
Public Attributes | |
DEFINE_IMAGEIO_FUNC | |
Private Types | |
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 | |
const char * | HDR_EXT = "hdr" |
const char * | IMG_EXT = "img" |
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.
|
Definition at line 65 of file salio.h. 00066 { 00067 X_SCAN_AXIS, 00068 Y_SCAN_AXIS 00069 };
|
|
Definition at line 71 of file salio.h. 00072 { 00073 NON_RASTER_SCAN, 00074 RASTER_SCAN 00075 };
|
|
Definition at line 57 of file salio.cpp. References 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 }
|
|
Definition at line 67 of file salio.cpp. References sal_file. 00068 { 00069 if (sal_file) { 00070 fclose(sal_file); 00071 sal_file = 0; 00072 } 00073 }
|
|
Definition at line 145 of file salio.cpp. References EMAN::Util::check_file_by_magic(), 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 }
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 54 of file salio.cpp. Referenced by is_valid(). |
|
Definition at line 82 of file salio.h. Referenced by SalIO(). |
|
Definition at line 83 of file salio.h. Referenced by SalIO(). |
|
Definition at line 86 of file salio.h. Referenced by SalIO(). |
|
Definition at line 84 of file salio.h. Referenced by SalIO(). |
|
|
|
Definition at line 80 of file salio.h. Referenced by ~SalIO(). |
|
Definition at line 85 of file salio.h. Referenced by SalIO(). |