Tomo-tools training - Part 4: removing rings artefacts¶

Rings artefacts can have many causes. They are detrimental for steps following reconstruction (eg. segmentation).

1. Rings artefacts removal with nabu¶

In Nabu, two rings correction methods are available:

  • Projections-based: "double flat-field"
  • Sinogram-based: "sinogram deringer"

Volume-based rings corrections is not available yet.

Preparing the dataset¶

We will use another dataset (but still bamboo!) where plain reconstruction yields rings artefacts.
/scisoft/tomo_training/part4_rings/bamboo_rings.nx

Create a new directory and a new nabu configuration file:

mkdir my_dir
cd my_dir
nabu-config --dataset /scisoft/tomo_training/part4_rings/bamboo_rings.nx

Perform a first reconstruction: nabu nabu.conf --slice middle and visualize it.

bamboo reconstruction with rings

1.1 - Projections-based rings removal ("double flat-field")¶

This method consists in two steps:

  • Compute a "mean projection" image dff
  • Divide each projection with this mean projection

test

In python:

dff = projections.mean(axis=0) # sum the 3D stack over the angles
projections /= dff # divide each projection with this image

Hopefully, when computing the "mean projection" dff, the sample-dependent features cancel out, and only the systematic noise remains. Thus, dividing the projections with dff will remove the systematic noise.

Needless to say, quantitativeness is lost when using this method!

In the configuration file, the parameter to use is double_flatfield_enabled in section [preproc]:

# ...
[preproc]
double_flatfield_enabled = 1
# ...

(this option corresponds to DOUBLEFFCORRECTION in PyHST2)

Exercise¶

  • Modify the nabu configuration file to enable double flatfield
  • Run the reconstruction of one slice and visualize it

bamboo reconstruction, dff enabled

Advanced parameters¶

Sometimes, averaging projections along the angles is not enough to cancel out the sample-dependent features.
Some low-frequency signal still remains, which may give rings artefacts even after DFF.

One possible solution is to apply a high-pass filter on the DFF image, using an unsharp mask with tunable strength dff_sigma.

# ...
[preproc]
# Whether to enable the 'double flat-field' filetering for correcting rings artefacts.
double_flatfield_enabled = 1
# Enable high-pass filtering on double flatfield with this value of 'sigma'
dff_sigma = 0.8
# ...

Pre-computing the DFF¶

The DFF image can be pre-computed once and for all for the current dataset, with the command nabu-double-flatfield <dataset>.

A HDF5 file is generated, it contains the DFF image. It can be provided to the processes_file parameter of the nabu configuration file:

# ...
[preproc]
processes_file = /path/to/my/dff.h5
# ...

Exercise¶

  • Generate the DFF file: nabu-double-flatfield /scisoft/tomo_data/nabu/bamboo_rings/bamboo.nx /path/to/my/dff.h5
    • This takes a while! To monitor progress, you can use the --loglevel debug option.
  • Edit the nabu configuration file to use "dff.h5" as a processes_file.
  • Run the reconstruction, visualize the reconstructed slice(s)

1.2 - Sinogram-based rings removal¶

This method is an implementation of the paper [munch09], hereby called "Munch filter".
It consists in doing a wavelets decomposition of the sinogram, examine the "vertical coefficients" to detect vertical lines, and filter them out.

[munch09] B. Munch, P. Trtik, F. Marone, M. Stampanoni, Stripe and ring artifact removal with
combined wavelet-Fourier filtering, Optics Express 17(10):8567-8591, 2009.

In Nabu, this rings removal method is enabled using sino_rings_correction = munch in [preproc]:

[preproc]
sino_rings_correction = munch

Exercise¶

  • Edit the nabu configuration file to use this method
  • Reconstruct and visualize the result

Advanced parameters¶

The method from paper [munch09] has some parameters which can be tuned: "sigma" (gaussian filter strength), "levels" (number of wavelets decomposition levels), and "wname" (name of the wavelet filter).

As a rule of thumb:

  • Higher values of sigma means more filtering
  • Higher values of levels might yield artefacts, especially in the center (since the filtering occurs accross more wavelets scales, it is more prone to inversion issues)
  • Changing the wavelet filter wname has less impact

These advanced options are passed through the sino_rings_options parameter in [preproc] section. The syntax is the following:

[preproc]
sino_rings_correction = munch
sino_rings_options = sigma=1.0 ; levels=10; wname='db15' # mind the semicolon separator

These parameters correspond to FW_SIGMA, FW_LEVELS and FW_WNAME in PyHST2.


2 - Rings artefacts removal using tomwer¶

The same options are available from the nabu slice interface from tomwer nabu slice

this is available from the pre processing stage

tomwer interface for rings corrections

In [ ]: