Processing math: 100%
ImageDev

Image Data

This group contains functions to load and save images that can be processed or returned by any ImageDev algorithm.

VIP file format

The VIP format is an image file format, especially designed for managing any ImageDev data. It is a raw file format organized as follows: FieldSize (bytes)TypeDescriptionMagic Number44 character stringThe VIP format identifier: "VIPI"Version4Unsigned longThe VIP format version (generally 2)Header Size4Unsigned longThe header size HS, in bytesHeaderHSHeader structureThe header structure (more information below)DataThe image data (more information below)

VIP header organization

The VIP header contains the following information: FieldSize (bytes)TypeDescriptionData Type4Unsigned longFlag indicating the pixel data typeElement Type4Unsigned longFlag indicating the element type; from version 2Is Binary1Unsigned charThe image is binary if not equal to 0Is Label1Unsigned charThe image is label if not equal to 0Size X4Unsigned longNumber of elements of the X dimensionSize Y4Unsigned longNumber of elements of the Y dimensionSize C4Unsigned longNumber of spectral channelsSize Z4Unsigned longNumber of elements of the Z dimensionSize T4Unsigned longNumber of elements for image sequenceCalibration X60Calibration structureThe calibration information of the X dimension (spacing, unit) Calibration Y60Calibration structureThe calibration information of the Y dimension (spacing, unit) Calibration C60Calibration structureThe calibration information of the spectral dimension (spacing, unit) Calibration Z60Calibration structureThe calibration information of the X dimension (spacing, unit) Calibration T60Calibration structureThe calibration information of the sequence dimension (spacing, unit) Color interpretation4Unsigned longFlag indicating the color interpretation; from version 3Origin X8DoubleOrigin of the X dimension; from version 4Origin Y8DoubleOrigin of the Y dimension; from version 4Origin C8DoubleOrigin of spectral channels; from version 4Origin Z8DoubleOrigin of the Z dimension; from version 4Origin T8DoubleOrigin for image sequence; from version 4Spatial directions72Double[3]Spatial directions of the spatial axis system; from version 5

Data type

This flag indicates the data type of all image element (pixels or voxels). NameValueDescriptionUINT808-bit unsigned integerUINT16116-bit unsigned integerUINT32232-bit unsigned integerINT848-bit signed integerINT16516-bit signed integerINT32632-bit signed integerFLOAT32832-bit real floating-pointFLOAT64964-bit real floating-pointCOMPLEX_FLOAT321032-bit complex floating-pointCOMPLEX_FLOAT641164-bit complex floating-point

Element type

The element type flag indicates the type of mathematical dimension associated with each image element. NameValueDescriptionSINGLE0Single scalar valueVECTOR_2162D vector, generally representing X and Y coordinates of a vector fieldVECTOR_3323D vector, generally representing X, Y, and Z coordinates of a vector fieldMATRIX_2X2_SYM2562x2 symmetric matrix, i.e., 3 elements, generally representing a 2D tensor fieldMATRIX_3X3_SYM5123x3 symmetric matrix, i.e., 6 elements, generally representing a 3D tensor field

Dimensional calibration

Each dimension of a VIP image has a calibration representing the data in world coordinates along this dimension. This information is set in a calibration structure organized as follows: FieldSize (bytes)TypeDescriptionImage Size4Unsigned longA known length along the related dimension in image units; for example, pixelsWCS Size8DoubleThe size corresponding to the image size in the world coordinate systemUnit4848 character stringThe unit of the world coordinate system, until 48 characters For instance, if the calibration attached to the X axis of a 2D image gives: it means that along the horizontal axis, 120 pixels correspond to 240 nanometers (that is, 1 pixel = 2 nm).

Color interpretation

The color interpretation flag indicates how to interpret the color images. NameValueDescriptionUNKNOWN0UnknownRGB1Red, Green, BlueHSL2Hue, Saturation, LightnessYIQ3Brightness, In-phase, Quadrature (NTSC)NRGB4RGB color with chromaticity coordinates

Spatial directions

Describes a spatial axis system, with direction vectors describing the three axes.
Axes are defined in a right hand system, so the third direction can be computed from the first two. This information is set in a calibration structure organized as follows: FieldSize (bytes)TypeDescriptionColumn direction24Double[3]The direction vector following the column dimension (X)Row direction24Double[3]The direction vector following the row dimension (Y)Slice direction24Double[3]The direction vector following the slice dimension (Z)

VIP data organization

The VIP format theoritically supports up to 6 dimensions: the X, Y, and Z axis of a volume, channels of a spectral image, time steps of an image sequence, and the vectoriel information given by the element type. The last dimension, managing vector or matrix fields, is interlaced in the data format. Other information is non-interlaced and hierarchized as follows: