SD format, version 7 -------------------- Bytes 0-3: Magic number (unsigned int), 0x444d5007 (DMPversion in ASCII) Byte 4-7: Number of bytes in header block (including self and magic number) (unsigned int) Byte 8-11: Number of frames (unsigned int) Byte 12-15: Number of points per frame (unsigned int) Byte 16-19: Number of sample points stored in file (unsigned int) Byte 20-23: Scanner pitch value (inter-frame linear screw distance) (float) (sign of pitch indicates scanning direction; neg=upward) Byte 24-27 Scanner nod value of middle of scan (float) Byte 28-31 Scanner turn value (float) Byte 32-35 Scanner horizontal translation value (float) Byte 36-39 Scanner vertical translation value (float) Byte 40-43 Scanner configuration (unsigned int) vscan = (config & 0x00000001); tup = (config & 0x00000002) >> 1; tconf = (config & 0x0000000c) >> 2; tflip = (config & 0x00000010) >> 4; Byte 44-47 Scanner laser intensity value (float) Byte 48-51 Scanner camera sensitivity value (float) Each frame has 2 unsigned shorts; the first is the index of the first column containing valid data, the second is the index of the first column containing invalid data. Clearly, then, a 0,0 pair indicates no valid data exists in the frame. The header block (above) is followed by a block of these index pairs, one pair per frame. The next block contains a stream of the valid range sample data, one frame at a time. Each sample point is indicated with an unsigned short for the depth value. Invalid/missing data points are indicated with 0. The final block contains the valid luminance sample data, one frame at a time. Each luminance sample is indicated with a byte per sample; invalid/missing data points are indicated with 0, as are points of no intensity! ------------------ David Koller dk@cs.stanford.edu