CBIA 3D image representation library
This library provides a representation of 1D, 2D and 3D images. The short name is i3dcore. It is developed entirely in the C++ programming language with extensive use of templates.
Every image is internally always represented as a 3D image. The dimensionality of the image is understood as the result of 3 minus the number of fixed coordinates. This results in the following means of representation:
- 1D image is a line given by (x,0,0),
- 2D image is a plane given by (x,y,0),
- 3D image is a stack of same-sized planes given by (x,y,z).
Images are composed from voxels (volume picture element) arranged in the regular orthogonal voxel grid. The voxel is the carrier of the visual information which, in turn, is represented by a voxel type. We support binary, grayscale, float and RGB voxel types. Note that the RGB voxel type, in fact, increases the dimensionality by adding a colour component.
The representation is governed by the template class i3d::Image3d <VOXEL> where the template parameter defines voxel type. The class predominantely provides the load and save image methods as well as many data accessing methods such as:
- allocate memory for a new image
- copy a certain VOI out of the image
- get some image parameters: size, resolutions, etc.
- get pointers directly to image data
The class can also store, besides the image array, information about the resolution and offset of the image. However, not every supported image format allows for storing and retrieving of such metadata.
One may also be interested in the CBIA 3D image algorithms library, i3dalgo, which provides various image processing routines. See its documentation at http://cbia.fi.muni.cz/user_dirs/i3dlib_doc/i3dalgo/ .
The basic image class is i3d::Image3d. It is a common ground for all image manipulating, processing and analysis functions.
The simple instantiation is done by calling its constructor with the name of the image to be openned: i3d::Image3d<i3d::GRAY8> my_image("lena.tif"); // open 8b grasyscale image
Consequently, do some image processing.
Saving the results is straightforward:
my_image.SaveImage("new_name.jpg"); // save the image
The library supports various image formats:
- I3D (internal)
- TIFF (requires libtiff)
- JPEG (requires libjpeg)
- TARGA (internal)
- MetaIO (internal)
- ICS (requires libics)
When using any of them, default compression algorithm is used:
- TIFF ... LZW (Lempel-Ziv-Welch)
- JPEG ... discrete cosine transform
- TARGA ... RLE (Run-length encoding)
- MetaIO ... None
- ICS ... Gzip (LZ77, Huffman or LZW)
The I3D is capable of manipulation with 1b, 8b, 16b, 24b, 48b raster image data (TIFF and TARGA support 48b TrueColor images). For this purpose, special data types have been defined:
The layout of image data in the memory is as follows. The whole image is stored using std::valarray in a scalable one-dimensional array with row by row and plane by plane voxel arrangement. Hence, the voxel at (x,y,z) is in the i3d::Image3d::data [z * i3d::Image3d::GetSliceSize() + y * i3d::Image3d::GetWidth() + x].
The library is licensed under the GNU GPL license. Its text is included in the library and is also accessible from the documentation, see The GNU General Purpose License .
Our goal is to develop the library according to the C++ standard. In principle, it should work on any platform with a good C++ compiler. However, we have succesfully compiled and tested this library only on the following x86-based architectures:
- Microsoft Windows XP and Server 2003 with Microsoft Visual C++ 2005
- Linux 2.4 and Linux 2.6 with GNU C++ compiler 4.x.x
- Mac OS X 10.5 Leopard - GNU C++ compiler 4.x.x
The installation guide can be found at http://cbia.fi.muni.cz/user_dirs/i3dlib_doc/install.html .
The sources of the CBIA's i3dalgo are freely available at http://cbia.fi.muni.cz/projects/the-cbia-i3dcore-and-i3dalgo-libraries.html . You may need to register before downloading.
A collection of sample programs is present in the original source package of both libraries. This collection is also available at http://cbia.fi.muni.cz/user_dirs/i3dlib_doc/i3d_examples.zip (20kB) for reference.
It is a common work of members of CBIA as well as students from Faculty of informatics, Masaryk University. Nevertheless, the major contributors were: Petr Mejzlík, Petr Matula <pem@fi.muni.cz>, Pavel Matula <pam@fi.muni.cz> and David Svoboda <svoboda@fi.muni.cz>.
There are some header and source code files which are part of this library but weren't created by the CBIA. We redistribute these files as a part of our library but do not provide any warranty if using these codes.
This files are:
Generated on Fri Mar 27 09:03:35 2009 for i3dcore by
1.5.4