Skip to content

Ultraliser Volumes

Marwan Abdellah edited this page Jul 27, 2022 · 1 revision

Introduction

As discussed in [REFERENCE TO FILE FORMATS] , Ultraliser can read input volumes in several file formats. Nevertheless, we designed an Ultraliser-specific volume format, similar to the NRRD files, to allow us to extend the file with custom fields or attributes that could be required by our internal workflows or ecosystem. This format has the extension .UVOL (or Ultraliser VOLume).

UVOL Format

Description

The .UVOL volume is a single file that contains the header information in ASCII encoding in addition to the data in a raw sequence encoded in binary.

The header, that contains the file specifications, is marked between the HEADER_BEGIN and HEADER_END clauses. The basic structure of the header is as follows:

HEADER_BEGIN
format:FORMAT
sizes:NXxNYxNZ
HEADER_END

where NX, NY and NZ define the dimensions or number of voxels along the X, Y and Z dimensions. The FORMAT keyword specifies the structure of the data. It can take one of the following options:

Format Description Voxel Size Max. Voxel Value
bit Each voxel in the volume is represented by a single bit 1 bit 1
uchar Each voxel in the volume is represented by a single byte as an unsigned char (uint_8) 1 byte 255
ushort Each voxel in the volume is represented by two bytes as an unsigned short (uint_16) 2 bytes 65535
uint Each voxel in the volume is represented by four bytes as an unsigned int (uint_32) 4 bytes 4294967295
ulong Each voxel in the volume is represented by eight bytes as an unsigned long (uint_64) 8 bytes 18446744073709551615
float Each voxel in the volume is represented by four bytes as a single-precision floating point value (float) 4 bytes 3.40282e+038
double Each voxel in the volume is represented by eight bytes as double-precision floating point value (double) 8 bytes 1.79769e+308

The formats are defined in the Defines.h interface in Ultraliser as follows:

#define FORMAT_BIT                              STRING("bit")
#define FORMAT_8UI                              STRING("uchar")
#define FORMAT_16UI                             STRING("ushort")
#define FORMAT_32UI                             STRING("uint")
#define FORMAT_64UI                             STRING("ulong")
#define FORMAT_F32                              STRING("float")
#define FORMAT_F64                              STRING("double")

Exporting a Volume

To export an Ultraliser-specific volume for an input mesh or morphology, you can use the command line arguments --export-bit-volume and --export-unsigned-volume to export .UVOL volumes having bit and uchar internal formats respectively.

Raw Format .HDR/.IMG

TBD

NRRD Format

TBD