Next: Volume Processing
Up: OpenVL - The Open
Previous: Volume Objects
Contents
File Input/Output and Utility Classes
This component of OpenVL is responsible for providing read and write functionality for various file formats.
To provide this functionality, we have an interface which can be implemented for a specific file
format. This interface is called the File Input/Output API (Figure 5). At the time of this writing, OpenVL provides support for three file formats: the VolVis [1] Slice format, the Volpack [9] DEN format, and the raw file format. To provide support for a new file format, a new class which implements the File I/O API is needed (as shown by dashed box in Figure 5). The new file format will then be automatically used by the Volume API (Section 3.3).
Figure 5:
File Input/Output component of OpenVL.
|
The File I/O API is very simple which makes writing file i/o plugins easy. It consists of three functions which need to be implemented. The first
is readInfo(). This function reads information about the volume data that resides in the file:
its dimensions, data type, etc. The second function is readData() which actually
reads voxels from the file and loads them into the data layout. The third function is writeData()
which writes the data stored in the layout to the file. In addition to these, there is one more function for
finding which file extensions are suppored by the file format: getFileExtensions().
OpenVL provides many utility classes that make it easy to work with volumetric data. Some of these classes are:
- vlSlice: This class gives a slice cut from a volume. It supports arbitrary orientation.
- vlTxFunction: This class provides a transfer function. It provides the API for manipulation
of the transfer function and for creating a look up table of arbitrary width.
- vlClock: This class finds the time used with precision of the order of 1 micro sec.
In addtion to these, OpenVL provides commonly used classes like: vlTriple, vlVector, vlNormal, vlMatrix, vlDim, vlUnit, vlPoint, etc.
Next: Volume Processing
Up: OpenVL - The Open
Previous: Volume Objects
Contents
Sarang Lakare
2002-12-23