Public Types | Public Member Functions | Private Member Functions

cmtk::ClassStream Class Reference
[cmtkIO Library]

Class for writing and reading various library classes to and from disk. More...

#include <cmtkClassStream.h>

Inheritance diagram for cmtk::ClassStream:
Inheritance graph
[legend]
Collaboration diagram for cmtk::ClassStream:
Collaboration graph
[legend]

List of all members.

Public Types

enum  FileMode { READ = TYPEDSTREAM_READ, WRITE = TYPEDSTREAM_WRITE, WRITE_ZLIB = TYPEDSTREAM_WRITE_ZLIB, APPEND = TYPEDSTREAM_APPEND }
 

Access modes for archives.

More...

Public Member Functions

 ClassStream ()
 Default constructor.
 ClassStream (const char *filename, const FileMode mode)
 Open constructor.
 ClassStream (const char *dir, const char *archive, const FileMode mode)
 Open constructor for separate path and archive names.
void Open (const char *filename, const FileMode mode)
 Open another archive without constructing a new object.
void Open (const char *dir, const char *archive, const FileMode mode)
 Open another archive in explicit directory.
ClassStreamoperator<< (const WarpXform *warpXform)
 Write generic transformation object.
ClassStreamoperator<< (const SplineWarpXform &splineWarpXform)
 Write spline transformation object.
ClassStreamoperator>> (WarpXform::SmartPtr &warpXform)
 Read (spline or linear) warp transformation.
ClassStreamoperator>> (WarpXform *&warpXform)
 Read (spline or linear) warp transformation.
ClassStreamGet (WarpXform::SmartPtr &warpXform, const AffineXform *affineXform=NULL)
 Actually read warp transformation object.
ClassStreamGet (WarpXform *&warpXform, const AffineXform *affineXform=NULL)
 Actually read warp transformation object.
ClassStreamoperator<< (const ParametricPlane *parametricPlane)
 Write parametric plane object.
ClassStreamoperator<< (const ParametricPlane &parametricPlane)
 Write parametric plane object.
ClassStreamoperator>> (ParametricPlane *&parametricPlane)
 Read parametric plane.
ClassStreamoperator<< (const LandmarkList *landmarkList)
 Write landmark list.
ClassStreamoperator<< (const LandmarkList &landmarkList)
 Write landmark list.
ClassStreamoperator>> (LandmarkList::SmartPtr &landmarkList)
 Read landmark list.

Private Member Functions

ClassStreamPutWarp (const WarpXform *warpXform)
 Write actual warp transformation object.

Detailed Description

Class for writing and reading various library classes to and from disk.

For all relevant objects in the Base library, input and output operators (>> and <<) are defined , much like std::iostream does for basic data types.

Definition at line 59 of file cmtkClassStream.h.


Member Enumeration Documentation

Access modes for archives.

Enumerator:
READ 

Read-only access.

WRITE 

Write-only access.

WRITE_ZLIB 

Write-only access piped through zlib/gzip compression.

APPEND 

Open existing archive and append to it.

Definition at line 65 of file cmtkClassStream.h.


Constructor & Destructor Documentation

cmtk::ClassStream::ClassStream (  ) [inline]

Default constructor.

Definition at line 77 of file cmtkClassStream.h.

cmtk::ClassStream::ClassStream ( const char *  filename,
const FileMode  mode 
) [inline]

Open constructor.

Parameters:
filenameName of the archive to open.
modeAccess mode, ie. read-only, write-only, etc.

Definition at line 83 of file cmtkClassStream.h.

cmtk::ClassStream::ClassStream ( const char *  dir,
const char *  archive,
const FileMode  mode 
) [inline]

Open constructor for separate path and archive names.

Parameters:
dirDirectory to open archive in.
archiveName of the archive to open.
modeAccess mode, ie. read-only, write-only, etc.

Definition at line 91 of file cmtkClassStream.h.


Member Function Documentation

void cmtk::ClassStream::Open ( const char *  dir,
const char *  archive,
const FileMode  mode 
) [inline]

Open another archive in explicit directory.

Definition at line 102 of file cmtkClassStream.h.

void cmtk::ClassStream::Open ( const char *  filename,
const FileMode  mode 
) [inline]
ClassStream& cmtk::ClassStream::operator<< ( const LandmarkList landmarkList ) [inline]

Write landmark list.

This function works on a reference rather than a pointer. It immediately calls the pointer-based function defined above for the actual writing.

Definition at line 159 of file cmtkClassStream.h.

ClassStream& cmtk::ClassStream::operator<< ( const ParametricPlane parametricPlane ) [inline]

Write parametric plane object.

This function works on a reference rather than a pointer. It immediately calls the pointer-based function defined above for the actual writing.

Definition at line 145 of file cmtkClassStream.h.

ClassStream& cmtk::ClassStream::operator<< ( const SplineWarpXform splineWarpXform ) [inline]

Write spline transformation object.

This function works on a reference rather than a pointer. It immediately calls the pointer-based function defined above for the actual writing.

Definition at line 117 of file cmtkClassStream.h.

ClassStream& cmtk::ClassStream::operator>> ( LandmarkList::SmartPtr landmarkList )

Read landmark list.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines