next up previous contents
Next: Accessing Voxel Data Up: Accessing Volumetric Data using Previous: Accessing Volumetric Data using   Contents

Initializing an Iterator

Before initializing an OpenVL iterator, you need to know the datatype of the data stored in the volume. That is, you need to know if the data is unsigned char, short, float etc. For example, if the data is 8 bit unsigned, then the usual way of initializing an iterator would be:
// For a volume defined as vlVolume *vol
vlVolIter<uint8> iter(vol);

The default constructor of the iterator expects a pointer to a vlVolume object on which the iterator will be initialized2.1. After initialization, the iterator position is always set to the start of the volume data. The start of the volume data is the first non-zero voxel in the data and need not mean the position $ (0,0,0)$.



Sarang Lakare 2003-04-26