ImageLayer
ImageLayer is a very large image layer, which can be gradually filled with smaller images. The accumulation of smaller images is done in the background thread, thus keeping Chart UI thread responsive and fast (for example zooming could be done while images are loaded). While compounding ImageLayer from many smaller bitmaps requires a lot of memory, the chart itself remains very interactive & fast (during and after layer is loaded). On top of ImageLayer all ViewXY series can be rendered. It is possible to create multiple ImageLayers and each layer's visibility can be switched on/off independently. On top of main layers, several sublayers of images could be created, each of them reduces pixel count approximately by factor 4. This allows fast interaction in application with all zoom levels (works similarly as tiles of geographical maps).
For the best performance and the least memory usage it is recommended to supply images to ImageLayer in Indexed8 color space format. Otherwise internally images will be converted to 32bit RGBA format (which requires ~3 time as much memory).
Example of 2 ImageLayers, where first one is compound from 1024 smaller images
Note, before version 12.4 ImageLayer did not support reversed Axes.
Sublayers
Once all source images are added to the layer (indicated by layer.EndAddingImages() method call), the sublayers could be created. Each sublayer represents zoom-level, with constant reduction of pixel count in layer (approximate reduction factor is 4). Method’s EndAddingImages() input arguments defines how many sublayers/zoom-levels should be created. When complete layers is visible, the sublayer with lowest amount of details is shown. This allows fast interaction with Chart (e.g. panning) while giving a good overview of ImageLayer. When the user zooms in, more detailed sublayers are shown until main (0 level) is reached.
Sublayers are created by merging sets of original images into new image. Sublayer is created, if there are at least 7 images in single row (therefore it maybe less sublayers than user requested). First sublayer merges 2x2 set of original images, second sublayer merges 4x4 original images and so forth.
In case images are sparsely distributes (i.e. not covering whole area) 'new' pixel rendered with base color (as set by method EndAddingImages(int subLayerCount, int baseColorIndex = 0)) for Indexed8 color space format or as transparent color for full color image.
Applicability
This feature will be handy in Semiconductor industry, where optical measuring systems are used for surface analysis. The surface in question could be silicon wafers, micro-electromechanical systems (MEMS) or similar.
However, the use of LightningChart’ s ImageLayer feature is not limited to Semiconductor industry. Any application which requires a display of a very large image and needs fast zooming, could use this feature. If there is information about each sub-image position and size (in XY axes units), users can create a collage of any size.
To see feature demonstration as example, check ExampleImageLayer from our Demo.