ImLib3D borrows many concepts from the Standard Template Library. If you are not familiar with STL here is a recommended introduction, more links are available here . STL is very powerful, is part of the C++ standard, and is included with all modern compilers.


Templated Image Classes:
ImLib3D images are STL-like templated containers and may be manipulated with the same syntax as standard STL containers. This means you can create images containing arbitrary types (examples: float, int, complex, 3D vectors for deformation fields, ...). [Example use,Base container class]
Manipulating images often means that you will have to iterate through each element of the image. Iterators provide a standard mechanism for doing that, avoiding errors and providing a significant speed improvement. Instead of writing triple nested for loops, you may use a single loop which improves code readability. Different types of iterators are available. The simplest one permits very fast iteration through an image, and is computationally equivalent to a pointer. Another iterator type may be used if you need to keep track of the (x,y,z) position you are at. More sophisticated iterators allow for moving around images in special ways, like in masked images or rectangular sub-zones in an image. All standard STL algorithms (sort, find, for_each, mismatch...) work. [Example use,Example use 2,Example stl]
Generic Image Properties:
Users often need to associate information to an image. For example one might want to add patient information to an image of a patient's brain. One mechanism provided by C++ is to use inheritance. However, this may require too much effort in many situations. ImLib3D images allow for arbitrary, named image properties too be attached to an image, in a type-safe manner.
Sparse Images:
3D images may become very large, and often, only a small portion of the image contains useful data. Sparse images store only the data of specified voxels in the image. [class]
Bit Images:
The templated images allow for any type to be used, but the smallest possible size of type is a byte. Bit images allow for voxels that are of an arbitrary number of bits. This is very useful when manipulating very large images. [class]
ImLib3D images are sampled on a rectangular grid. An interpolator may be assigned to an image, for retrieving values on non-grid points. Provided interpolators include, nearest neighbor, linear, sinc, and spline interpolators. Spline interpolation is particularly efficient. The specified interpolator is also used when the image undergoes a geometrical transform (rotation, affine etc.).

Tools, utilities

Threaded task progress manager:
Processing of 3D images may be long and users usually get anxious if they do not know what is happening. ImLib3d provides task progress supervision using threads. That means you do not have to add any extra code in your processing loops, and particularly no extra code in speed critical inner loops. The user simply has to declare that he wants to monitor the progress of a given variable or iterator.
Geometric primitives
3D vectors, rectangles, transforms:
miscellaneous tools
tools for managing strings, files, plotting and more. ImLib3d uses the standard string class, but provides functions for replacing, splitting, formatting, converting... A simple plotting interface to GnuPlot is provided. An error management mechanism is provided, optionally using exceptions or user specified handlers.

Image Processors

Image processors are C++ functions that are organized into a hierarchical tree, and that follow a common syntax. Image processors are fully described in an XML file. They are also accessible from the command line and from the viewer. A mechanism for easy processing of image arguments is provided. Here are some categories of available image processors: BrainProcessors Arithmetic ImageStats MorphologicalOperators Estimator Threshold Transform LinearFiltering ImageAs1DVector ShapeAnalysis VisualizationAids Registration ConvenienceProcessors FileConversion TestPatterns Normalization FFTOperators . There are currently (this may be out of date) more than 100 different image processors.

Image Processor Management

As stated previously, image processors are fully described in an XML file (more details). Users may add new image processors without recompiling or modifying any installed files. Image processor plugins are simple to implement and only require putting a few files in a path environment variable. [Example plugin]

XML Image Processors Description

Image Processors, and related information, are fully described in an XML file. Users that wish to add image processors (as plugins) may write their own XML description files. Each processor has a long and short documentation, and each of it's arguments (input and output) is fully described. The description is detailed enough for automatic generation of the code that is needed for the command line class, and for the automatic generation of the viewer's image processor dialogs. This will also permit in the future, the development of graphical programing interface for chaining image processors together. Since ImLib3d uses templated images, it must know what image types the user wants to use for each templated image processor. These types are grouped into TemplateGroups that are also listed in the XML file.

Image Processors Interface

Calling image processors through the command line, or from the viewer, requires a systematic type-independent way of accessing all image processors (call by name). This is done using automatically generated source code from the XML description. Each image processor may be called using a string description of it's arguments, or alternately, using type-safe generic pointers for certain arguments.