PVL (Processed VoLume) file format, as used by Drishti


The description that follows is extracted with only minor editing from the Drishti online help. Some additional comments.

From the Drishti Manual

RAW Format

The datatype for volume data in the RAW file can be either unsigned byte, unsigned short (2 bytes), unsigned int (4 bytes) or float (4 bytes). There are three options for the format of RAW files :

PVL Format

PVL stands for Processed Volume. This file is generated from the RAW data by Drishti. The format for PVL is as follows :

The first 4 bytes are all zero.

Followed by 128 byte comment.

The next 12 bytes contain grid size as three 4-byte integers - [NX][NY][NZ].

Followed by voxel data with 2-bytes per voxel irrespective of the original volume data type. The first byte of the 2-byte voxel information is the voxel intensity and the second byte is the voxel gradient magnitude. The voxel gradient is numerically computed using Sobel tranform. The voxel intensity and gradient information is scaled to fit in one byte.

The file size of a 128x128x128 volume is 4+128+12+128*128*128*2 = 4194448 bytes.