ImageDev

Image Data

This section introduces the ImageView object, an image data model used by ImageDev.
In ImageDev, an image object is defined by an ImageView class of the IOLink library.

IOLink is an abstract data model that manages agnostic data. As it is very generic, views are proposed to represent data with a simpler model. Views are specialized to a type of data, like the ImageView class, which describes images. An interface mechanism allows the connection of data to IOLink in a unified way.
The IOLink data model can theoritically manage any type of data. ImageDev only supports the ImageView object from IOLink.

Loading and saving image files

Managing standard image files with IOFormat

IOFormat is a library developed by Thermo Fisher Scientific that is independent from ImageDev.

The IOFormat library can be used to: The readImage and writeView functions are available for this purpose.

IOFormat supports most of common file formats and several other formats dedicated to electron microscopy. The list of available file formats is available here.

The IOLink library is essential for ImageDev operation, and is embedded in its distribution. However, IOFormat must be installed separately, as described in the Getting Started sections.

The IOLink library is binary compatible between its minor versions. \begin{array}{|c|c|c|c|} \hline \textbf{ImageDev version} & \textbf{Embedded IOLink version}& \textbf{Supported IOLink versions} & \textbf{Recommended IOFormat versions} \\ \hline \hline \text{ 2023.2 } & \text{1.6.1} & \text{>=1.6.1 and <2.0} & \text{>=1.3.1 and <2.0} \\ \hline \text{ 2023.1 } & \text{1.4} & \text{>=1.4 and <2.0} & \text{>=1.1 and <2.0} \\ \hline \text{ 2022.2 } & \text{1.2} & \text{>=1.2 and <2.0} & \text{>=0.33 and <2.0} \\ \hline \text{ 2022.1 } & \text{1.1} & \text{>=1.1 and <2.0} & \text{>=0.33 and <2.0} \\ \hline \end{array}

Managing specific image files with the vip format

ImageDev may generate some specific data that cannot be properly saved and reopened with a standard file format. For instance, the output of the GaussianHessianMatrix3d is a 6-channel 3D image. IOFormat is not able to save such data correctly, at least not in a consistent way for ImageDev.
The vip extension refers to the proprietary file format managing all data generated by ImageDev. The ReadVipImage and WriteVipImage functions can be used to load and save data with the vip extension.

Image types

IOLink image types are defined by three parameters, returned by the functions: More information about IOLink and ImageDev image types is available in the Data Type Management section.

Dimensional management

ImageView objects supported by ImageDev can have 5 dimensions: the X, Y and Z axis of a volume, the channels of a spectral image, and the time steps of an image sequence.
The following functions can be used to know and change the dimensional organization of ImageView data: For instance, if you run the following code:
std::cout << "myImage is a " << myImage->axesInterpretation().toString() << std::endl;
std::cout << "Number of Dimensions = " << myImage->dimensionCount() << std::endl;
for ( size_t i = 0; i < myImage->dimensionCount(); i++ )
{
    std::cout << "Dimension " << i << ": size = " << myImage->shape().at( i )
              << " - interpretation = " << std::endl;
}
print("my_image is a " + my_image.axes_interpretation.to_string() )
print("Number of Dimensions = " + str(my_image.dimension_count) )
for i in range(my_image.dimension_count) :
    print("Dimension " + str(i) + ": size = " + str(my_image.shape.at( i )))
Console.WriteLine("myImage is a " + myImage.AxesInterpretation.ToString());
Console.WriteLine("Number of Dimensions = " + myImage.DimensionCount );
for (Byte i = 0; i < myImage.DimensionCount; i++)
{
  Console.WriteLine($"Dimension {i}: size = {myImage.Shape.At(i)}");
}
it returns: meaning that the myImage image view represents a three-dimensional image (X=100, Y=125, Z=15).
If the following instruction is added:
myImage->setAxesInterpretation( iolink::ImageTypeId::IMAGE_SEQUENCE );
my_image.axes_interpretation = iolink.ImageTypeId.IMAGE_SEQUENCE
myImage.AxesInterpretation = ImageTypeId.IMAGE_SEQUENCE;
the same ImageView is now considered to be a time series (or sequence) of 15 two-dimensional images.

Data Access

Data values of an image view can be read or modified, mostly by two methods: The point-wise access is much slower than the region access, but consumes less memory, especially for accessing scattered pixels.

Calibration

The image calibration information gives the real distance corresponding to a pixel. Depending on the file format from which an image is extracted and the way it has been loaded, a calibration may be directly imported or not, and this calibration may be relevant or not.
The calibration information affects the result of most Image Analysis algorithms.

In ImageDev, the calibration information is directly given by the ImageView with two properties:

Color management

There are two usual ways to represent color images: By default, IOLink considers color images in interlaced mode. Consequently, when loading a color image with IOFormat, the returned ImageView object has the following properties: This type of ImageView can be used by any ImageDev algorithm that supports color images. However, internally ImageDev supports only color images in planar mode. To optimize performances in image processing chains, all color images generated by ImageDev have the following properties: