Rings artefacts can have many causes. They are detrimental for steps following reconstruction (eg. segmentation).
In Nabu, two rings correction methods are available:
Volume-based rings corrections is not available yet.
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.
This method consists in two steps:
dff
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)
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
# ...
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
# ...
nabu-double-flatfield /scisoft/tomo_data/nabu/bamboo_rings/bamboo.nx /path/to/my/dff.h5
--loglevel debug
option.dff.h5
" as a processes_file
.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
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:
sigma
means more filteringlevels
might yield artefacts, especially in the center (since the filtering occurs accross more wavelets scales, it is more prone to inversion issues)wname
has less impactThese 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.
The same options are available from the nabu slice
interface from tomwer
this is available from the pre processing
stage