Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::XYZIO Class Reference

XYZIO is a sample Image IO class. More...

#include <io_template.h>

Inheritance diagram for EMAN::XYZIO:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XYZIO (const string &filename, IOMode rw_mode=READ_ONLY)
 ~XYZIO ()
int get_nimg ()
 Return the number of images in this image file.

Static Public Member Functions

bool is_valid (const void *first_block)

Public Attributes

 DEFINE_IMAGEIO_FUNC

Private Attributes

string filename
IOMode rw_mode
FILE * xyz_file
bool is_big_endian
bool initialized

Detailed Description

XYZIO is a sample Image IO class.

It defines all required API that you may need to implement.

Definition at line 43 of file io_template.h.


Constructor & Destructor Documentation

XYZIO::XYZIO const string &  filename,
IOMode  rw_mode = READ_ONLY
 

Definition at line 37 of file io_template.cpp.

References is_big_endian, and EMAN::ByteOrder::is_host_big_endian().

00038 :       filename(file), rw_mode(rw), xyz_file(0), initialized(false)
00039 {
00040         is_big_endian = ByteOrder::is_host_big_endian();
00041 }

XYZIO::~XYZIO  ) 
 

Definition at line 43 of file io_template.cpp.

References xyz_file.

00044 {
00045         if (xyz_file) {
00046                 fclose(xyz_file);
00047                 xyz_file = 0;
00048         }
00049 }


Member Function Documentation

int XYZIO::get_nimg  )  [virtual]
 

Return the number of images in this image file.

Reimplemented from EMAN::ImageIO.

Definition at line 145 of file io_template.cpp.

References EMAN::ImageIO::init().

00146 {
00147         init();
00148 
00149         return 1;
00150 }

bool XYZIO::is_valid const void *  first_block  )  [static]
 

Definition at line 70 of file io_template.cpp.

00071 {
00072         ENTERFUNC;
00073         bool result = false;
00074         if (!first_block) {
00075                 result = false;
00076         }
00077 
00078         // check image format validality here
00079         
00080         EXITFUNC;
00081         return result;
00082 }


Member Data Documentation

EMAN::XYZIO::DEFINE_IMAGEIO_FUNC
 

Definition at line 49 of file io_template.h.

string EMAN::XYZIO::filename [private]
 

Definition at line 54 of file io_template.h.

bool EMAN::XYZIO::initialized [private]
 

Definition at line 59 of file io_template.h.

bool EMAN::XYZIO::is_big_endian [private]
 

Definition at line 58 of file io_template.h.

Referenced by XYZIO().

IOMode EMAN::XYZIO::rw_mode [private]
 

Definition at line 55 of file io_template.h.

FILE* EMAN::XYZIO::xyz_file [private]
 

Definition at line 56 of file io_template.h.

Referenced by ~XYZIO().


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:48:13 2013 for EMAN2 by  doxygen 1.3.9.1