DatasetWriter Class Reference
[Graphics]

Creates a dataset from a text file or another dataset. More...

#include <DatasetWriter.hpp>

List of all members.

Public Member Functions

string getInput () const
string getOutput () const
int getJump () const
void setInput (const string &filename)
void setOutput (const string &filename)
void setJump (int)
void write ()

Protected Member Functions

void writeHeader (ostream &file)
void writeAsUnsignedShort (ofstream &file)

Private Attributes

Datasetdataset
DatasetHeaderheader
string input
string output
int jump

Static Private Attributes

static float USHRT_SCALE = ((float)1)/USHRT_MAX*UCHAR_MAX

Detailed Description

Creates a dataset from a text file or another dataset.

The text file should follow the basic form of a VLB file, except the data is human readable. In fact, the header is exactly the same, and DatasetHeader is even used to process it. The data meanwhile is read in one slice at a time from front to back. Each slice starts with the bottom left row and then proceeds upwards through the rows. Each value should be separated by spaces, and line breaks do not matter within the data section, so feel free to format the data as you wish. Data is written out as unsigned bytes with no spaces.

Note:
Currently the only type supported is unit8 (unsigned bytes).
See also:
Dataset

The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:35 2010 for Gander by  doxygen 1.6.3