Public Types | Static Public Member Functions

FileIO Class Reference
[Classes of the ODIN data processing framework (odindata library)]

#include <fileio.h>

List of all members.

Public Types

typedef STD_map< Protocol,
Data< float, 4 > > 
ProtocolDataMap

Static Public Member Functions

static int autoread (ProtocolDataMap &pdmap, const STD_string &filename, const FileReadOpts &opts, const Protocol &protocol_template, ProgressMeter *progmeter=0)
static int autowrite (const ProtocolDataMap &pdmap, const STD_string &filename, const FileWriteOpts &opts)
static svector autoformats ()
static STD_string autoformats_str (const STD_string &indent="")
static bool get_trace_status ()
static void set_trace_status (bool stat)

Detailed Description

Structure to accomodate autoread/autwrite functionality. Please refer to (Input/Output of medical image data (odindata library) ) for a detailed description of this module.

Definition at line 52 of file fileio.h.


Member Typedef Documentation

typedef STD_map<Protocol, Data<float,4> > FileIO::ProtocolDataMap

Type to associate protocols with tempo-spatial raw data via std::map

Definition at line 59 of file fileio.h.


Member Function Documentation

static svector FileIO::autoformats (  )  [static]

Returns possible file formats/extensions to autoread autowrite

static STD_string FileIO::autoformats_str ( const STD_string &  indent = ""  )  [static]

Returns possible file formats as string with comment

static int FileIO::autoread ( ProtocolDataMap pdmap,
const STD_string &  filename,
const FileReadOpts opts,
const Protocol protocol_template,
ProgressMeter progmeter = 0 
) [static]

Reads in file 'filename' and appends all data sets found to protocol-data map 'pdmap', autodetects file format according to file extension. Read options are given by 'opts' and 'protocol_template' contains defaults used by the decoder/encoder of the particular file format. The progress meter 'progmeter' can be optionally specified to monitor the progress of the operation. Returns number of slices, or -1 if it fails.

static int FileIO::autowrite ( const ProtocolDataMap pdmap,
const STD_string &  filename,
const FileWriteOpts opts 
) [static]

Writes out protocol-data map 'pdmap' to file(s) filename, autodetects file format according to file extension. Write options are given by 'opts'. Returns number of slices sucessfully written, or -1 if it fails.

static bool FileIO::get_trace_status (  )  [inline, static]

Returns whether tracing via stdout is enabled/disabled

Definition at line 90 of file fileio.h.

static void FileIO::set_trace_status ( bool  stat  )  [inline, static]

Enables/disables tracing via stdout

Definition at line 95 of file fileio.h.


The documentation for this class was generated from the following file: