EMAN2
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
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

static 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 
)
XYZIO::~XYZIO ( )

Definition at line 43 of file io_template.cpp.

References xyz_file.

{
        if (xyz_file) {
                fclose(xyz_file);
                xyz_file = 0;
        }
}

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

{
        init();

        return 1;
}
bool XYZIO::is_valid ( const void *  first_block) [static]

Definition at line 70 of file io_template.cpp.

References ENTERFUNC, and EXITFUNC.

{
        ENTERFUNC;
        bool result = false;
        if (!first_block) {
                result = false;
        }

        // check image format validality here
        
        EXITFUNC;
        return result;
}

Member Data Documentation

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.

Definition at line 58 of file io_template.h.

Referenced by XYZIO().

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: