VoxData/IRISReader System Structure

IRISReader is a superclass providing facilities for reading image data into a vtkImageData object from an input file stream. The base class IRISReader is designed for reading in headerless raw image data. Derived subclasses should provide a ReadHeader() function to read the header from the stream and set the appropriate member variables (e.g. header size, dimensions of the image). It is expected that a new subclass will be made for each new image file format; e.g. GiplReader. See also the FileIO module for facilities to instantiate subclasses of IRISReader depending on the file extension.

Normal use of IRISReader includes instantiation (via the class method IRISReader::New()), passing in an ifstream or filename to open. The ReadHeader() function will return zero if opening the ifstream or file failed. In subclasses of IRISReader, the ReadHeader() method will also set various member variables. Set/Get functions also allow direct access to the member variables.

After setting the file information, the ReadData(vtkImageData*) function can be used to read data into a vtkImageData object from the file stream. Note that IRISReader does not return a vtkImageData object, but only modifies an externally instantiated vtkImageData object. It is the responsibility of the calling function to instantiate with vtkImageData::New() and free memory with Delete().