Crystal Image Slideshow

Crystal Image

Quantitative Image Analysis


Looking for the packages? Skip directly to the download section
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 Advanced Biomedical Image Analysis Cover

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.

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 functions.

Volunteers would be welcome.

Known Bugs

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.

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 Kubuntu Linux 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.1 (November 2022)

The current version 1.0.1 is a minor maintenance and bug fix release. It was mainly prompted by gcc version 10 and later, in which tolerant handling of incorrectly used global variables is no longer allowed. At issue are variables that are defined rather than declared in header files and that consequently lead to multiple definitions every time a header file is included. Prior to gcc-10, this mistake was tolerated, but it now leads to a linker error. In cimage 1.0.1, a very ugly kludge is applied with the -fcommon linker flag. The flag reverts gcc's behavior to the old style and thus allows compiling cimage.

Evidently, a more comprehensive revision is needed in which global variables are properly declared extern in the header files and defined in one module only. In subsequent releases, this will be accomplished. However, the gcc-10 incident raises the question of a broader cimage roadmap. Crystal Image has been developed over a long time, and some code sections appear like the old ramparts of a historical building. Some date back to GTK 1.2, and deteriorating compatibility becomes evident. Over time, some compatibility issues were simply patched over, but they continue to accumulate. These issues affect almost exclusively the GUI component and not the image processing algorithms. At some point, it appears that a major overhaul becomes inevitable, which leads back to the roadmap. As of this version, the roadmap issue is left open, though.

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 two options to run Crystal Image (the old LiveDVD is no longer a viable option):
  1. Install a pre-compiled binary package on a Debian-based Linux distribution
  2. Compile from source
1. LiveDVD:
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, whose support ended 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 precompiled binary.

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: cimage-1.0.1_src.tar.bz2. Save the file in a suitable directory, decompress (bunzip2), and unpack with tar xvf cimage-1.0.1_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: You can use the following command to install the development libraries and their dependencies:
	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:

   ./autogen.sh

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

   make
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:
   cd modules
   make cimage_sv
   sudo cp cimage_sv /usr/local/bin

Contact

This software is maintained by Mark A. Haidekker. E-mail: send 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:

  1. Contact me at the e-mail address below. I will gladly burn a DVD and mail it to you
  2. Download the ISO image and burn your own DVD.
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.

If you want to check if the download was successful, here are the checksums:
md5sum: 9378d7442ff99ba78dc1fda586d6f1a2
sha1sum: 02691996bab71dd7618818f2aaa6211dbd222972