Part 2: finding the center of rotation¶
Finding the CoR is a crucial step in reconstruction. This parameter is probably the most important - without a correct center of rotation, no reconstruction can be done.
Estimating the CoR can be done manually or (almost) automatically.
In this part, we see how to
- Review different CoR estimation methods available with Nabu
- Use nabu (command line) to find the CoR
- Use tomwer (graphical interface) to find the CoR
1 - Center of rotation estimation with Nabu¶
Nabu provides several Center of Rotation (CoR) estimation methods.
See the documentation page for CoR.
For this tutorial, we still use the half-acquisition "bamboo" dataset.
You can generate a configuration file with nabu-config --dataset /where/you/generated/the/bambou_hercules.nx
.
1.1 - Where to provide center of rotation (estimation) in configuration file¶
The relevant section in configuration file is [reconstruction]
.
[reconstruction]
rotation_axis_position = <cor_or_method>
If a scalar value is provided (e.g. 2069.5
), then this value will be used for reconstruction.
Otherwise, the parameter is the name of an estimation method (eg. rotation_axis_position = sliding-window
).
Note an empty value means the center is half the detector width.
1.2 List of estimation methods¶
Nabu comes with a collection of CoR estimation methods. They work differently (on pairs of radios, sinograms, with correlation or subtraction, etc).
Method name | Notes |
---|---|
sliding-window | Fast, works well for micro-CT |
growing-window | Slow, global search |
composite-coarse-to-fine | Slow, uses an initial estimate. Equivalent to "near" in octave-fasttomo |
fourier-angles | Fast, needs initial estimate |
octave-accurate | Fast, only works for centered tomography |
sino-sliding-window | Same principle as sliding-window, applied on sinogram |
sino-growing-window | Same principle as growing-window, applied on sinogram |
Older, less reliable methods¶
Method name | Notes |
---|---|
global | Very slow, global search. Works well in nano-CT. |
centered | Fast, works for centered tomo. |
sino-coarse-to-fine | Fast, sinogram-based. Needs a 360 degrees scans. |
1.3 - Estimators relying on an initial estimate¶
ESRF Bliss acquisition files come with an initial estimate of the center of rotation. This CoR estimate is done when initially aligning the beamline setup.
This value can be obtained by dividing the "yrot" motor position (usually instrument/positioners/yrot
in Bliss files) with the pixel size.
In the NX file, this information can be found in instrument/detector/estimated_cor_from_motor
, in pixel units, offset from the middle of the detector.
By default, nabu will automatically look in the NX file for the estimated_cor_from_motor
field.
Caution
- In the NX file,
estimated_cor_from_motor
is a position (in pixel units) from middle of the detector - In nabu configuration
rotation_axis_position
is a position (in pixel units) from the left-most pixel of the detector
The following estimators should use an initial estimate - they work well, but will have poor performance without a good-enough initial estimate:
composite-coarse-to-fine
(aka "near")fourier-angles
The following estimators can use an initial estimate - they still have decent performance if not:
sliding-window
(andsino-sliding-window
)
All the other estimators do not use an initial estimate.
Exercise¶
- Use
sliding-window
on the "bamboo" dataset - it should correctly find the CoR. - Set
rotation_axis_position=2069.5
(this will forcenabu
to use this value), run the reconstruction of your favourite slice and compare with previously.
1.4 - Advanced options¶
Most estimators can be tuned with advanced options. In nabu, the default options try to be good for most cases.
In the configuration file, these options are provided in the field cor_options
.
For example, to use sliding-window
and look to the right side of the detector:
[reconstruction]
rotation_axis_position = `sliding-window`
cor_options = side="right"
The syntax of cor_options
is admittedly cumbersome:
- Don't forget quotes for side="right"
- Parameters are separated by semicolon:
side="right"; low_pass=1; high_pass=20
Exercise¶
- Set the config file as below and run the reconstruction.
[reconstruction]
rotation_axis_position = `sliding-window`
cor_options = side=2069.5
- Compare the obtained COR value obtained. In this case,
nabu
passes that value to thesliding-window
algo as a first guess.
1.5 - Reconstructing one slice with several COR values at once¶
One can also reconstruct one slice at several COR positions at once with
nabu-multicor nabu.conf middle 2049:2069:1
This will reconstruct the middle slice at all COR values from 2049 to 2069, with a step of 1 pixel. All the other options are taken from the nabu.conf
file.
2 - Using tomwer "semi-automatic" rotation axis finder¶
See the dedicated notebook