CTAS (ΘS) Package Homepage


CTAS package is a set of tools for the Computed Tomography and Tomothynsesis reconstruction for the parallel beam geometry. It also contains additional tools for the various X-ray contrast manipulations (Diffraction Enhanced Imaging, Inline Phase Contrast) which allow the reconstruction from these types of the X-ray contrasts.

About

CTAS package is a set of tools for the Computed Tomography (CT) and Tomothynsesis (TS) reconstruction for the parallel beam geometry (usually available at the synchrotron sources). It also contains additional tools for the various X-ray contrast manipulations (Diffraction Enhanced Imaging (DEI), Inline Phase Contrast (IPC)). Historically i started to write this package because I wanted to implement DEI-based CT, but could not find any open-source solution to start with. So, yes, contrast players, this package is for you - I hope it can help you to avoid my situation when I started. The historical background automatically prompts to the region of potential applications. Basically I can see several categories of people which can be interested in the package. Of cause, I do not limit myself or anyone else in this.
Synchrotron beamliners / end users.
The package is usable for the automated mass CT reconstruction. It has advanced CLI interface and therefore should be easily plug-able into any environment. The package was designed and written on the base of my own experience in the CT experiments at various synchrotron sources (mainly Photon Factory, Spring-8, Australian Synchrotron). I tried to design the reconstruction procedures isolated from the data acquisition which may strongly vary facility to facility and even beamline to beamline. Whatever acquisition/control system you are using at your facility you can easily adopt this package for your own acquisition system, making minimal changes into it (in most cases a few-line bash-shell is enough). I would be pleased to help with this.
CT algorithm developers
If you want to play with new CT algorithm (for example you want to implement reconstruction on the GPU or FPGA or whatever), but have no time to write code for the whole infrastructure (sinogram formation, flat field subtraction, filtering windows, etc.) you can plug in your algorithm into the source code (see developer documentation for the instructions) and reconstruct real experimental data using your algorithm. Currently the package can only work with the parallel beam geometry. And it is very unlikely that I will ever include other geometries (f.e. cone- or fan-beam) on myself because I always use synchrotron sources for the imaging. However, if you want to include this support I am very open for the discussion. We can think together on the redesign the package to include the geometry you need.
X-Ray Contrast researchers
If you want to develop / implement some additional contrast(s) (f.e. X-ray inline, phase, etc), but do not want to write the whole infrastructure, you can do with this package: see developer documentation for the instructions.
The CTAS package was initially written during my work on the PhD thesis. The physical principles of the contrast processing implemented in this package were described in a number of publications:
[1] A. Maksimenko, M. Ando, S. Hiroshi, and T. Yuasa, Computed tomographic reconstruction based on x-ray refraction contrast, Appl. Phys. Lett., 86, 124105 (2005).
[2] A. Maksimenko, T. Yuasa, and M. Ando, Mathematical Details of the Refraction-based Computed Tomography, in Proc. IASTED Computer Graphics and Imaging 2007, 553, 019 (2007).
[3] A. Maksimenko, Nonlinear extension of the x-ray diffraction enhanced imaging, Appl. Phys. Lett. 90, 154106 (2007).
[4] A. Maksimenko, T. Yuasa, and M. Ando and E. Hashimoto, Refraction-based tomosynthesis: Proof of the concept, Appl. Phys. Lett. 91, 234108 (2007).
The IPC support was added using the theory described in the following works:
[5] Andrei V. Bronnikov, Theory of quantitative phase-contrast computed tomography, J. Opt. Soc. Am. A, 19, 472 (2002).
[6] A. Groso, R. Abela and M. Stampanoni, Implementation of a fast method for high resolution phase contrast tomography, Opt. Express, 14, 8103 (2006).
[7] Yoni De Witte, Matthieu Boone, Jelle Vlassenbroeck, Manuel Dierick, and Luc Van Hoorebeke, Bronnikov-aided correction for x-ray computed tomography, J. Opt. Soc. Am. A, 26, 890 (2009).

Installation

Download

I distribute the package in the source code. Generally you need to compile and install everything by hand. You can do it in the standard way (with the assumption that your system fulfils all requirements). Also I provide binary packages for MS Windows (well, slightly castrated version). You can browse all packages and versions here or directly download the latest version from the links below:

Source code (all platforms):
ctas-0.5.0.tar.bz2.

MS Windows binaries:
ctas-0.5.0.winbin.zip.

Platform

This package was developed, tested and used on various distributions of the Linux operation systems. It was designed and coded with the cross-platform approach in mind (no platform-specific libraries / tools are in use). It is (theoretically) expected to compile in most POSIX-compatible environment. I compiled and tested the package on various Linux distributions (Gentoo, Ubuntu, CentOS), MacOS X (using the dependencies from the MacPorts project) and MS Windows (see ctas.sln file in the source code. Note the package will not compile with MSVS-2010 because of this bug).

Requirements

The direct dependencies of the package are: On UNIX platforms the configure script checks for the required libraries and informs you if it needs something to be installed: install them in the manner you platform supports. On MS Windows you can install all the requirements and then link the code to them or alternatively use the package containing all of them (see Download section above).

Install

On UNIX platforms.

Unpack the source code archive:
@ tar -jxf <distribution archive>

Go to the package's directory
@ cd <package dir>

Configure the source:
@ ./configure
The configuration script will check for the presence of all required libraries in your system and tell you if any has to be installed.
Make:
@ make

And install (as root user):
# make install

On MacOS X.

Install the MacPorts as it is described on their site. Install following ports:
  • fftw-3
  • fftw-3-single
  • freeimage
  • tiff
  • imagemagick
  • gsl
  • gsl-devel
  • using the command
    @ sudo port install <port>

    Unpack the source code archive:
    @ tar -jxf <distribution archive>

    Go to the package's directory
    @ cd <package dir>

    Configure the source:
    @ LDFLAGS="-L/opt/local/lib" CXXFLAGS="-I/opt/local/include" CPPFLAGS="-I/opt/local/include" ./configure

    Make:
    @ make

    And install (as root user):
    @ sudo make install

    On MS Windows.

    Just unpack the windows binary distribution anywhere and use ctas.bat from the command line. If you want to develop, the MSVS-2008 Solution file (ctas.sln) as well as projects (in the msvs directory) are in the source code distribution.

    Usage and Documentation

    Usage

    The package has advanced command-line interface (CLI) which can is used for all manipulations. All tools follow the principle of silence: the program does not output anything to the standard output unless it is asked to do so. However, the program may output certain messages into the standart error stream. It can be warning or errors (the latter ones in most cases lead to the termination of the program). You can use the option
    short option long option description
    -v --verbose prints brief description
    present in all tools to output certain process information (progress bars, etc.). All tools exit with the exit status 0 if everything went OK and non-zero otherwise. All tools in the package are interactive-less: once started the program will never ask for any additional input. This behaviour of the package allows easy integration of it into any software system above (control, automatic acquisition, data pre- and post-processing, 3D rendering, etc). The package has no Graphical user interface (GUI), but it is a high priority in the TODO list. The package main executable is called 'ctas'. It is used as the interface to all tools from the package with the following syntax:
    @ ctas <tool>

    For the full list of the tools installed with the package you can run:
    @ ctas list
    or
    @ ctas help

    I have some nice examples showing how the tools work in the real data processing. However, the size is too large to attach them to the main distribution (4Gb for the full-size images). So the examples which comes with the distribution are strongly downsized. You can find them in the example sub-directory of the distribution. Please don't hesitate to request the full-size examples via e-mail: antonmx@gmail.com.

    User documentation

    I designed the CLI to be self-describing. The ctas command and every tool in the package has got at least three standart options which provide helpful information on the usage:
    short option long option description
    -? --usage prints brief description
    -h --help prints help message which briefly describes all possible options
    -v --verbose When combined with two above options shows more details.
    Each tool in the package has it's own manual page with very detailed information on each parameter. Use command
    @ man ctas-<tool>
    to read them. The \ is the name of the tool. For example the manual page for the 'ct-dei' tool is 'ctas-ct-dei'. You can also browse the HTML versions of the manual pages.

    Developer documentation

    When writing the code of the package I always had in mind possible co-developers so I documented each function, class (including members), global variable. I used Doxygen tags for comments to generate the developer documentation automatically.

    Current Status

    Now the package is still in a very premature condition. A lot of work has to be done. Although the package was in a very intensive use for the real-life data processing, bugs are expected. Many algorithms used in the package should and must be optimized. I cannot say that it was written/tested/used deep and wide enough to call it 'stable' in any sense.

    The package is going to be in more or less intense development. I cannot guarantee that the internal API and/or the end-user interface will be kept in the current condition. I can guarantee that all the changes in the end-user interface would be clearly documented in the ChangeLog file in the source directory and on this page: News..

    The milestones to be achieved:

    Before version 0.3 (DONE)

    One single binary which includes all steps of the data processing. Now the package contains a set of tools each capable of doing one single job: background removal, DEI extraction, reconstruction, etc. However, each of these tools saves the intermediate data into some files on disk, what is far from being effective from many points of view: the disk space, memory consumption, file I/O operations (especially regarding very flexible, but inefficient approach of the ImM library). The single binary which combines all the steps can process data with only one input and one output disk operation. This will dramatically increase the computation time. The presence of this single binary will not remove any of the currently present tools since they can still be useful for the data processing.

    Before version 0.4 (Partly done)

    (DONE) Prepare separate "sino-*" tools for each type of input contrasts: they will read foreground-background pairs from the FgBg file(s) similar to the "ct-abs" and "ct-dei" tools. The "sino" tool just reads any number of files and form the sinogram without any processing (flat field subtraction, dei, etc).

    (NOT) Add possibility to read vertical slices (currently assume the rotation axis is vertical, i.e. perpendicular to the image's horizontal axis).

    (DONE) Clean up the CT algorithm:

    Future plans

  • Full multithreading approach. Now only a very basic threading is realized in the CT reconstruction algorithm.
  • GPU-based reconstruction using CUDA SDK.
  • Cluster support.
  • Graphical user interface.
  • Wanted

    As I described above, the package can be used in the real-life experiments providing good output. There are a lot of features implemented and ready-to-use in the package. However, I can imagine much more work to be done in the future. I cannot implement everything possible and do all needed tests. Therefore I am seeking for users, testers, co-developers. Here I describe what you can do for the project .

    Users wanted

    I need users primary for the feedback. Tell me Of cause I cannot promise that I can realize the wishes or adopt the package for your needs, but I can promise that I will have your opinion in mind when designing and developing the package.

    Testers wanted

    I need someone to help me

    Coders wanted!

    I can see several main streams of the development. I cannot follow all of them myself and there are certain streams which are important, but are out of my personal interest. So, play with my code or give me yours which I can adopt for the package.

    News.

    2010-07-29: Version 0.5.0 released.

    Changes in the interface since version 0.4.9.

    2010-07-19: Version 0.4.9 released.

    Changes in the interface since version 0.4.3.

    2010-03-16: Version 0.4.3 released.

    Changes in the interface since version 0.4.2.

    2009-05-13: Version 0.4.2 released.

    Changes in the interface since version 0.4.1.

    2009-04-06: Version 0.4.1 released.

    Changes in the interface since version 0.4.

    2008-12-19: Version 0.4 released.

    Changes in the interface since version 0.3.

    2008-09-23: Version 0.3 released.

    Changes in the interface since version 0.2.

    License

    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 2 or any later version published by the Free Software Foundation; For details see http://www.gnu.org/copyleft/fdl.html.

    Acknowledgements

    The work on this package was partly supported by the following organizations: