next up previous contents
Next: Volume Access - Iterators Up: Volume Previous: Volume   Contents


Volume Data Layout

The OpenVL framework supports multiple layouts for volumetric data. By layout we mean some method of laying out volumetric data on a medium (memory, disk etc.). For example, loading volumetric data into memory as a linear array is one layout method.

Although a linear array can be used to lay out any volumetric data, it is not necessarily the best way. For example, a volumetric data of dimensions X x Y x Z requires an array of size X x Y x Z. The total memory required for this type of layout is the size of the array times the size of each voxel. Now suppose the data is sparse and contains only a few significant voxels. It would then be a real waste of memory to represent the whole data as an array. Instead, some compression technique [4] such as run length encoding (RLE) [9] can be applied to decrease the memory footprint of the layout.

Figure 3: Data kept in different layouts.
\includegraphics[width=280pt]{images/data_layout.eps}

Our goal with OpenVL is to allow different layout schemes for any volumetric data. We achieve this by abstracting the volume data from the volume access mechanism. We encapsulate the different layouts behind an API called the Volume Data Layout API. Figure 3 shows the organization of different data layouts inside the volume component of OpenVL. Every layout has to implement the Volume Data Layout API for its own data layout type. The dashed arrows indicate inheritance. As of this writing, OpenVL has two layouts implemented: the Linear layout and the Simple Run Length Encoded (RLE) layout. We show both of these in Figure 3. When a new layout for the data is implemented, it will have to implement the Volume Data Layout API. We show a new layout with dashed boxes. As the different data layouts are abstracted from the user applications, the applications can work with any data layout.

Additional data layouts promise to open many possibilities. We list a few of them here:

Since the layout is hidden from the applications, any application written using OpenVL will automatically make use of the unique features of the layout. Suppose we have an application which computes the histogram of a dataset. This application can work on huge datasets using a disk-based layout, and at the same time, this application can work in a distrbuted environment using the network-based layout. The same application will also be able to use texture memory instead of main memory for loading the dataset it is given.

The volume data layout API is simple and relatively small. It mainly exports information about the data. The information it exports includes the dimensions of the volume, the datatype of the voxels, the voxel unit distance, etc. In addition, it provides a very minimal API for accessing the voxels in the underlying layout: getVoxel() and setVoxel(). The reason for this minimal access API will be clear when we look at the more elaborate volume access API in the next section.


next up previous contents
Next: Volume Access - Iterators Up: Volume Previous: Volume   Contents
Sarang Lakare 2002-12-23