EMAN::SalIO Class Reference

A SAL image is an image from Perkin Elmer PDS Microdensitometer. More...

#include <salio.h>

Inheritance diagram for EMAN::SalIO:

Inheritance graph
[legend]
Collaboration diagram for EMAN::SalIO:

Collaboration graph
[legend]
List of all members.

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"

Detailed Description

A SAL image is an image from Perkin Elmer PDS Microdensitometer.

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.


Member Enumeration Documentation

enum EMAN::SalIO::ScanAxis [private]

Enumerator:
X_SCAN_AXIS 
Y_SCAN_AXIS 

Definition at line 65 of file salio.h.

00066                 {
00067                         X_SCAN_AXIS,
00068                         Y_SCAN_AXIS
00069                 };

enum EMAN::SalIO::ScanMode [private]

Enumerator:
NON_RASTER_SCAN 
RASTER_SCAN 

Definition at line 71 of file salio.h.

00072                 {
00073                         NON_RASTER_SCAN,
00074                         RASTER_SCAN
00075                 };


Constructor & Destructor Documentation

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 (  ) 

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 }


Member Function Documentation

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 }


Member Data Documentation

EMAN::SalIO::DEFINE_IMAGEIO_FUNC

Definition at line 57 of file salio.h.

string EMAN::SalIO::filename [private]

Definition at line 78 of file salio.h.

const char * SalIO::HDR_EXT = "hdr" [static, private]

Definition at line 61 of file salio.h.

const char * SalIO::IMG_EXT = "img" [static, private]

Definition at line 62 of file salio.h.

bool EMAN::SalIO::initialized [private]

Definition at line 81 of file salio.h.

const char * SalIO::MAGIC = " IDENTIFICATION" [static, private]

Definition at line 63 of file salio.h.

Referenced by is_valid().

int EMAN::SalIO::nx [private]

Definition at line 82 of file salio.h.

Referenced by SalIO().

int EMAN::SalIO::ny [private]

Definition at line 83 of file salio.h.

Referenced by SalIO().

float EMAN::SalIO::pixel [private]

Definition at line 86 of file salio.h.

Referenced by SalIO().

int EMAN::SalIO::record_length [private]

Definition at line 84 of file salio.h.

Referenced by SalIO().

IOMode EMAN::SalIO::rw_mode [private]

Definition at line 79 of file salio.h.

FILE* EMAN::SalIO::sal_file [private]

Definition at line 80 of file salio.h.

Referenced by ~SalIO().

ScanMode EMAN::SalIO::scan_mode [private]

Definition at line 85 of file salio.h.

Referenced by SalIO().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 12:45:08 2013 for EMAN2 by  doxygen 1.4.7