4.4. Global Image Processing Concepts

4.4.1. Temporary Global Concept

This concept has been designed for algorithms that require a single, very efficient random image access to calculate a result.

[Important]Important

If possible, try to avoid this approach!

It supports only limited image sizes which depend on the available memory!

Procedure:

  • Read entire input image (e.g., when first voxel or page is requested or when the user starts the algorithm by pressing some button)

  • Analyze the image and save all results

  • Free allocated image buffer

  • For page requests, the results are used to fill those pages

Advantages:

  • Global algorithms are easy to implement, because all image data is directly available.

  • Uses the memory only temporarily, i.e the memory is available again when the process has been finished.

Disadvantages:

  • Results must be saved/buffered in data structures and must be reconverted into requested pages. Hence, additional structures are required.

  • The image might not fit into memory.

  • Even if only one voxel or a small page is requested, the entire volume must be processed.

  • Danger of heap fragmentation.

4.4.2. Global Image Processing Concept

This concept is needed for time-critical random image access to calculate a result.

[Important]Important

If possible, try to avoid this approach!

It supports only limited image sizes which depend on the available memory!

Procedure:

  • Read entire input image (e.g., when first voxel or page is requested or when the user starts the algorithm by pressing some button)

  • Analyze the image and save all results

  • Free allocated image buffer

  • For page requests, the results are used to fill those pages.

Advantages:

  • Easy and fast implementation.

Disadvantages:

  • Degenerates the page-based, cached calculation process.

  • Fails on images which do not fit into memory.

  • Must map the entire image and blocks large memory areas for a long time. It cannot/should not be used in larger networks or applications because the "Out of Memory" state is easily reached.

  • Danger of heap fragmentation.

  • Usually the image must be passed page-based to the output which also requires additional implementation of page-based access to image.

Examples:

4.4.3. BitImage Concept

In the page-based image processing concept of the ML, Boolean data types are not available (nor are they planned).

The BitImage class can be used as an alternative option.

Advantages:

  • Easy-to-use and compact image

  • quite compact image although it is a global image

  • relatively fast.

Disadvantages:

  • Not paged, i.e., global; this, however, is not really problematic because only bits are stored

See Section 2.3.6, “ BitImage for a detailed overview.

4.4.4. MemoryImage Concept

Algorithms that need access to a whole non-paged memory-mapped image might use the MemoryImage approach for image processing (see Section 2.3.8, “ MemoryImage). Note that this breaks the page-based approach - nevertheless it is supported by the ML. It is integrated as a special member of the PagedImage in such a way that it can be handled in parallel or instead of a paged image (see Section 2.3.4, “ PagedImage ).