Quantitative Image Analysis
Looking for the packages? Skip directly to the
Need to replace the old (blue) DVD from my book? Go directly to the
DVD download section
What Is Crystal Image?
Crystal Image is a software program for image processing and analysis. Crystal Image has
a similar purpose and functionality as ImageJ and
IMAL, the Image Measurement and Analysis Lab
by Thomas Nelson.
Crystal Image, like ImageJ and IMAL, has a biomedical focus, but can readily be used for
image processing applications in any nonmedical field.
Key features are
Moreover, I have published a book, Advanced Biomedical Image Analysis, in which
modern, cutting-edge image processing and analysis methods are explained. Most of the
methods presented in the book are also implemented in Crystal Image, and most of the
book's example images have been created with Crystal Image. For this reason,
a DVD with Crystal Image accompanies the book.
- Processing of images with 8-bit and 16-bit grayscale formats,
24-bit RGB format, and 32-bit floating-point format.
- Import of images in various formats, including TIFF, DICOM, raw and ASCII
- Export to TIFF, raw, pgm, and native OpenDX format
- Contrast and brightness manipulation, false-coloring, and histogram correction
- Processing of 3D stacks
- Spatial-domain and Fourier-domain filters
- Wavelet-based filters
- Morphological operations
- Shape and texture analysis
- Segmentation (intensity-based segmentation, region growing, hystersis thresholding,
- Measurement (individual pixel intensities, line profiles, average profiles, histogram,
cluster analysis, apparent fractal dimensions)
- Automation through macro scripting
Click on the thumbnail to the right for more imformation about the book.
How to Cite Crystal Image in Scientific Works
If you use Crystal Image in your scientific work, you probably want to cite the software.
The easiest way is to provide the software name and version (e.g. Crystal Image v0.9.9) and
a reference to my book:
Haidekker, M.A. Image Analysis and Visualization Software (Chapter 14). In:
Advanced Biomedical Image Analysis, Wiley 2011.
What Functions Does Crystal Image Offer in Detail?
A short list of the functions can be found
here. Details can be found
in Advanced Biomedical Image Analysis
Crystal Image Documentation
Unfortunately, comprehensive on-line documentation is presently lacking.
Many functions are thoroughly explained in
my book, which contains examples, algorithms in pseudo-code, and a list of macro
Volunteers would be welcome.
Yes, they exist. And let's not start with the unknown bugs...
Click here for the list of known bugs and some workarounds.
Why Free Software?
You may be using software that is free of charge -- the Adobe reader, or the
Quicktime player, for instance -- but the philosophy behind Free Software
goes deeper. When downloading software free of charge, you most likely have
signed some contract ("EULA") that restricts your use of the software.
Moreover, you cannot know what the software actually does. You may have fought
the whims and vagaries of Digital Restrictions Management
(DRM). You may have heard about the
destructive rootkit and security hole that Sony-Bertelsmann included for "free"
on their music CDs.
You may have heard about Microsoft Genuine Advantage, a genuine advantage for Microsoft,
because it precludes you from running certain software in environments of your choice -
virtual machines or WINE.
When you download software without paying a royalty, this does not mean that the
software is Free (with capital F) in the sense of Free Software.
If you download a compiled executable
binary (such a a Windows .exe file), you have hardly any control over its actions.
Such software is not Free. The Free Software philosophy enumerates four specific freedoms:
These freedoms are explained in detail
by the Free Software Foundation. The key feature is your right to obtain
the source code, which enables you to study how the program works, and to add your own
changes and improvements to the software.
- The freedom to run the program, for any purpose
- The freedom to study how the program works, and change it to make
it do what you wish. Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help others.
- The freedom to distribute copies of your modified versions to others.
By doing this you can give the whole community a chance to benefit from
your changes. Access to the source code is a precondition for this.
It is noteworthy that the Free Software philosophy does not leave the software in an
anarchistic void. Rather, the goal of Free Software is to give all users the
freedom to redistribute and change Free Software. So instead of putting Free Software
in the public domain, we "copyleft" it.
Copyleft says that anyone who redistributes the software, with or without
changes, must pass along the freedoms listed above. For this purpose, Free Software is
released under the terms of a legally binding license, known as the
GNU General Public License.
In a scientific setting, an even stronger case can be made for Free Software
where the source code is accessible for everybody. Imagine the following
fictional section in the Materials & Methods section of a publication:
Samples were prepared from spectroscopy-grade ethanol (Sigma-Aldrich no. 02850)
by pipetting 1.0 ml solvent (Rainin PipetteLite LTS) with
20 microliters of the fluorophore in a 20 mM stock solution.
The solution was vigorously mixed in 15 ml centrifuge tubes (Fisher cat. no. 05-539-5)
for 30 seconds on a vortex mixer (Cole-Parmer). The sample was then (...)
Statistcal analysis was performed with MurkyStat v. 3.14 (Murky Software, Inc.).
Ethanol series were compared with the built-in ANOVA test (...)
Contrast the meticulous description of the sample preparation with the superficial
description of the statistical treatment. Proprietary, closed-source software does not
allow you to examine the underlying algorithms. More generally, when you use
software with unpublished source code, data processing steps
(such as, for example, image analysis, or statistical analysis) cannot be
reproduced by others. In fact, not even the users of closed-source software can
know how their software has processed the data. Bugs may remain undiscovered,
and unless the software users take tedious steps of validating their software,
incorrect data may enter the scientific literature and remain undiscovered.
There is a stark contrast between the meticulous disclosure of the
methods in scientific articles and the black-box nature of the data
processing and analysis components in the same articles. For this reason,
a strong case must be made in favor of Free Software in scientific applications
not only with respect to the liberties listed above, but also with
respect to transparency and reproducibility of scientific data.
Crystal Image and Windows?
Now that we discussed the features and advantages of Free Software,
we immediately realize that Microsoft Windows
is the exact antithesis of Free Software. I do not use Windows. I have created Crystal
Image primarily as a powerful tool for my own research. I do not support a Windows
version and encourage all of you to give Linux a try. I assure you that
with the KDE desktop has a similar functionality to Windows, and that Windows users
should get familiar with Kubuntu rapidly. The days where Linux was a geek-only
operating system are long gone.
That said, Crystal Image relies on the GTK library. GTK is well-known to run under
Windows with the Cygwin X-window emulator.
Although I have not tried it, it is almost certain that Crystal Image can be compiled
to run with Windows/Cygwin. Another good reason for having access to the source code:
You want it on Windows? Great. Go ahead and compile it.
Another very elegant alternative is for you Windows users to install
VMWare or Virtualbox.
These are virtual machines. You run Linux inside an application window, which is safe
to install. Myself, I run those few unavoidable Windows apps inside VirtualBox on
a Linux host. You can install your virtual machine with the LiveDVD, and you should be
up and running within less than 30 minutes.
NEW! Version 1.0.0 (January 2020)
The current version 1.0.0 is a major maintenance and feature improvement release.
Click here for the list of bug fixes and
new features in the most recent Crystal Image release. This includes a list of
changes for older versions.
Download and Installation
You have three options to run Crystal Image:
- Run the program from the LiveDVD, which is a full kubuntu-based Linux distribution.
You boot your computer from the DVD, work with the new software, and reboot from
the hard disk to restore your computer to its original operating system.
Alternatively, you can install kubuntu and all included software from the LiveDVD
onto your hard drive or into a virtual machine.
- Install a pre-compiled binary package on a Debian-based Linux distribution
- Compile from source
The LiveDVD is included in the book mentioned above.
If you do not have the book, you may donwload the ISO image
here. Note that the download
will be slow, because the image takes up 2 GB. Use your DVD burner software to create a DVD
from an ISO image (consult your DVD burner software manual how to burn an ISO image).
The LiveDVD that comes with my book or which you burn from the ISO image is
a great medium for you to run the software if you do not have a Linux computer or
if you want to try Linux without actually installing it.
If you have the LiveDVD, you may notice that any operation is relatively slow. The
reason is the DVD drive, which is typically hundreds of times slower than a hard drive.
You may get additional benefits from copying the DVD onto a USB flash drive, thus
creating a faster bootable medium. The additional advantage of the USB drive is that you
8can save data on the drive - this is not possible with a DVD.
You can create your bootable USB drive with these simple steps (I assume that you have
booted from the Live DVD):
- Insert an empty USB flash drive into any USB port. The flash drive should
be big enough to accept all data from the DVD, that is, bigger than 2 GB.
- Start a program called usb-creator. Either type this command from
a console, or use Start Menu -> System -> Startup Disk Creator.
A window similar to the one displayed to the right pops up.
- Choose the correct partition in your USB drive and simply click "Make
Please note that the LiveDVD is showing its age. It was built when the book went to press,
and the underlying version is kubuntu 10.04LTS Lucid Lynx. Although this is a long-term
support (LTS) version, its support expired in 2015. I can
no longer recommend a permanent installation from the LiveDVD. Instead, please
consider installing one of many Debian-based distros and then manually installing the
2. Precompiled binaries:
For Ubuntu/Debian systems, pre-compiled binaries are available.
Due to library changes in the distros, multiple versions of cimage-0.9.9
were maintained, but support for really old releases (14.04, 16.04) has been
discontinued for cimage-1.0.0. Precompiled older revisions, including those
compiled for 14.04 and 16.04, are still available.
Choose the binary package suited for for your system:
* It appears that Ubuntu's support for the i386 architecture was dropped,
and cimage-1.0.0 may well be the last binary with 32-bit support. This file was compiled on
Linux Mint 19.3.
** New feature: I will be building packages for the Raspberry Pi
as well, since we are using the RPi in a research project for a distributed imaging system.
Crystal Image works surprisingly well on the Raspberry Pi. However, I am not sure about
compatibility. If yours does not work, drop me a line.
Download the package and install with dpkg -i cimage-1.0.0_xxxxx.deb. Files will be installed
in /usr/local/cimage with symbolic links to the executables in /usr/local/bin. NOTE: The installer may
complain about some non-standard install features. This is not a bug. By using /usr/local/bin, I am
violating some Ubuntu standards that in turn violate GNU/Linux standards: /usr/local is INTENDED
for optional packages such as Crystal Image --
those, which the Ubuntu install database actually incorrectly labels as "obsolete or locally created".
You can safely ignore those install warnings.
If the package install fails due to unsatisfied dependencies, try
sudo apt-get install libc6-dev libtiff5 libtiff5-dev fftw3-dev libgtkglext1-dev libgsl0-dev \
libglu1-mesa-dev libgtkgl2.0-dev libgl1-mesa-dev
This will install those libraries and development headers that the cimage binary package needs.
Tip: I found Aptitude to be incredibly helpful for dragging in missing packages:
It is convenient, sure, but it is also transparent, more transparent than some GUI package managers.
3. Installation from source:
You can also download the source tarball from this link:
Save the file in a suitable directory, decompress (bunzip2), and unpack
with tar xvf cimage-1.0.0_src.tar. To compile the package, you need
to satisfy the following dependencies:
Although the above list is sufficient to compile the cimage binary and all modules,
the 3D OpenGL-based surface viewer (cimage_sv) requires additional modules:
- Build-essential (the GNU C compiler and related tools)
- autogen and automake
- libgtk-2.0 and libgtk-2.0-dev (the GIMP ToolKit library and its header files)
This includes GDK, GDK-Pixbuf and numerous other libraries
- FFTW3 (libfftw3 and libfftw3-dev)
- TIFF (libtiff4 and libtiff4-dev)
- GSL (libgsl0ldbl and libgsl0-dev)
You can use the following command to install the development libraries and their dependencies:
- OpenGL, for example, libgl1-mesa (for the standalone 3D surface viewer)
- GLU, that is, libglu1-mesa-dev
- libgtkgl2.0 and libgtkgl2.0-dev
- libgtkglext1 and libgtkglext1-dev (the GTK GL extensions)
sudo apt-get install build-essential automake autogen libc6-dev libgtk2.0-dev \
libgdk-pixbuf2.0-dev libtiff5-dev fftw3-dev libgtkglext1-dev \
libgsl0-dev libglu1-mesa-dev libgtkgl2.0-dev libgl1-mesa-dev
Once these libraries and their development headers are installed, use a command-line terminal,
enter the source directory and type these commands:
This command should collect the libraries you have installed and create the necessary Makefiles.
Note that you may have to remove the libtiff dependency in 'configure.in' for older systems.
Next, compile the entire package, including the modules, with
Provided that there were no errors, you can now start Crystal Image with src/cimage
or you can install the program:
sudo cp src/cimage /usr/local/bin
sudo mkdir -p /usr/local/cimage/dso
sudo cp modules/*.dso /usr/local/cimage/dso
If you want to use the external OpenGL-based 3D surface viewer, you need to additionally
enter these commands:
sudo cp cimage_sv /usr/local/bin
This software is maintained by Mark A. Haidekker. E-mail:
DVD NOTICE FOR CUSTOMERS OF MY BOOK:
Due to a production mistake, you may have a DVD that
cannot boot. If you have a RED DVD , you already have the new
production. This DVD should boot and thus give you access to the software and sample images.
If you have a BLUE DVD, the DVD will not work. You have two options:
Click here to download the ISO image. Save
the file on your hard disk, then use your DVD burner software to burn the ISO image. Note: Do not
burn the file, rather use it as an ISO image (this is an intermediate step of the DVD creation process).
Check your software manual how to burn an ISO image. Also note that the download is 2 GB.
Downloading the image may take some time.
- Contact me at the e-mail address below. I will gladly burn a DVD and mail it to you
- Download the ISO image and burn your own DVD.
If you want to check if the download was successful, here are the checksums: