Skip to main content

A fast, versatile and user-friendly image processing toolkit for computed tomography

Project description

About

PyPI version Documentation status

This repository contains Python data processing scripts to be used with the UFO framework. At the moment they are targeted at high-performance reconstruction of tomographic data sets.

If you use this software for publishing your data, we kindly ask you to cite the article

Faragó, T., Gasilov, S., Emslie, I., Zuber, M., Helfen, L., Vogelgesang, M. & Baumbach, T. (2022). J. Synchrotron Rad. 29, https://doi.org/10.1107/S160057752200282X

If you want to stay updated, subscribe to our newsletter. Simply leave the body of the e-mail empty and in the subject change YourFirstName YourLastName accordingly.

Installation

First make sure you have ufo-core and ufo-filters installed. For that, please follow the installation instructions. You can either install the prerequisites yourself on Linux, or use one of our Docker containers.

Then, for the newest version run the following in tofu's top directory:

pip install .

or to install via PyPI:

pip install ufo-tofu

in a prepared virtualenv or as root for system-wide installation. Note, that if you do plan to use the graphical user interface you need PyQt5, pyqtgraph and PyOpenGL. You are strongly advised to install PyQt through your system package manager, you can install pyqtgraph and PyOpenGL using the pip package manager though:

pip install pyqtgraph PyOpenGL

Usage

Flow

tofu flow is a visual flow programming tool. You can create a flow by using any task from ufo-filters and execute it. In includes visualization of 2D and 3D results, so you can quickly check the output of your flow, which is useful for finding algorithm parameters.

flow

Reconstruction

To do a tomographic reconstruction you simply call

$ tofu tomo --sinograms $PATH_TO_SINOGRAMS

from the command line. To get get correct results, you may need to append options such as --axis-pos/-a and --angle-step/-a (which are given in radians!). Input paths are either directories or glob patterns. Output paths are either directories or a format that contains one %i specifier:

$ tofu tomo --axis-pos=123.4 --angle-step=0.000123 \
     --sinograms="/foo/bar/*.tif" --output="/output/slices-%05i.tif"

You can get a help for all options by running

$ tofu tomo --help

and more verbose output by running with the -v/--verbose flag.

You can also load reconstruction parameters from a configuration file called reco.conf. You may create a template with

$ tofu init

Note, that options passed via the command line always override configuration parameters!

Besides scripted reconstructions, one can also run a standalone GUI for both reconstruction and quick assessment of the reconstructed data via

$ tofu gui

GUI

Performance measurement

If you are running at least ufo-core/filters 0.6, you can evaluate the performance of the filtered backprojection (without sinogram transposition!), with

$ tofu perf

You can customize parameter scans, pretty easily via

$ tofu perf --width 256:8192:256 --height 512

which will reconstruct all combinations of width between 256 and 8192 with a step of 256 and a fixed height of 512 pixels.

Estimating the center of rotation

If you do not know the correct center of rotation from your experimental setup, you can estimate it with:

$ tofu estimate -i $PATH_TO_SINOGRAMS

Currently, a modified algorithm based on the work of Donath et al. is used to determine the center.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ufo-tofu-0.13.0.tar.gz (189.9 kB view details)

Uploaded Source

File details

Details for the file ufo-tofu-0.13.0.tar.gz.

File metadata

  • Download URL: ufo-tofu-0.13.0.tar.gz
  • Upload date:
  • Size: 189.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for ufo-tofu-0.13.0.tar.gz
Algorithm Hash digest
SHA256 b25de9d5b754b867a3e8b0c0bb6fa5e16e7631656006848e4154b63addae2b78
MD5 bdf9691d3501c9c29c24ccc40405bcdf
BLAKE2b-256 9200a7d1e0cb7ac368f31e1237d610b28064b5d955b1f978496395f5e71a704f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page