#include <df3io.h>
Inheritance diagram for EMAN::Df3IO:
Public Member Functions | |
Df3IO (const string &filename, IOMode rw_mode=READ_ONLY) | |
~Df3IO () | |
Static Public Member Functions | |
bool | is_valid (const void *first_block, off_t file_size=0) |
Public Attributes | |
DEFINE_IMAGEIO_FUNC | |
Private Attributes | |
unsigned short | nx |
unsigned short | ny |
unsigned short | nz |
string | filename |
IOMode | rw_mode |
FILE * | df3file |
bool | initialized |
bool | is_new_file |
|
Definition at line 44 of file df3io.cpp. 00045 : filename(df3_filename), rw_mode(rw), df3file(0), 00046 initialized(false), is_new_file(false) 00047 { 00048 }
|
|
Definition at line 50 of file df3io.cpp. References df3file. 00051 { 00052 if (df3file) { 00053 fclose(df3file); 00054 df3file = 0; 00055 } 00056 }
|
|
Definition at line 264 of file df3io.cpp. References data, EMAN::ByteOrder::is_data_big_endian(), nx, nx, ny, and ny. Referenced by EMAN::EMUtil::get_image_type(). 00265 { 00266 ENTERFUNC; 00267 00268 if (!first_block) { 00269 return false; 00270 } 00271 00272 const unsigned short *data = static_cast < const unsigned short *>(first_block); 00273 unsigned short nx = data[0]; 00274 unsigned short ny = data[1]; 00275 unsigned short nz = data[2]; 00276 00277 if(ByteOrder::is_data_big_endian(&nx) && ByteOrder::is_data_big_endian(&ny) && ByteOrder::is_data_big_endian(&nz)) { 00278 return true; 00279 } 00280 00281 EXITFUNC; 00282 return false; 00283 }
|
|
|
|
Definition at line 70 of file df3io.h. Referenced by ~Df3IO(). |
|
|
|
|
|
|
|
Definition at line 67 of file df3io.h. Referenced by is_valid(). |
|
Definition at line 67 of file df3io.h. Referenced by is_valid(). |
|
|
|
|