Alternative Memory Models for ITK Images
Please use this identifier to cite or link to this publication: http://hdl.handle.net/10380/3068
New: Prefer using the following doi: https://doi.org/10.54294/u5l25a
By default ITK images use a contiguous memory model. This means pixel elements are stored in a single 1-D array, where each element is adjacent in memory to the previous element. However in some situations it is not desirable to use this memory model. This document describes three alternative memory models: slice contiguous, sparse, and single-bit binary images. Slice contiguous images are three-dimensional images, in which each slice is stored in a contiguous 1-D array, but the slices are not necessarily adjacent in memory. Slice contiguous images are well suited for interoperability with applications representing images using DICOM. Sparse images are n-dimensional images, in which each pixel is stored in a hash table data structure. This memory model is well suited for images with very large dimensions, but few pixels which are actually relevant. Single-bit binary images internally represent each pixel as a single-bit, in contrast to eight-bits required to represent a boolean. Single-bit binary images allow very compact representations for on-off masks. Source code, tests, and examples are provided to allow easy reproduction and use.