Tomwer tutorial 2 - reconstruction using nabu¶
Prerequisites¶
install nabu, tomwer & orange (see Installation)
get a valid .nx or .edf dataset. If the dataset is an HDF5 acquisition then see How to convert a .hdf5 dataset to a Nexus compliant dataset
Launch orange¶
If orange is installed using a python virtual environment first activate the python virtual environment. For example:
source /orange3venv/bin/activate
launching orange:
orange-canvas
The following canvas should appear:
On the left part you can see the different add-ons. Each contains several widgets. This part is also named ‘toolbox’ Tomwer add on is divided into three:
control: data control: give some input or listen to a bliss acquisition
reconstruction: data reconstruction slices using nabu
visualization: display information about data
The canvas is on the ‘main windows’ (top right). And on this area you can define a workflow to be process.
At the bottom you also have a log window to trace the process flow.
Goal¶
The goal is to reconstruct a few slices from a dataset. For this example we picked a ‘bamboo’ dataset. Which is originally a .hdf5 acquisition. This dataset has already been converted to nexus format using nxtomomill
Note
you can find this tutorial as a video here
Creating the workflow¶
To execute this reconstruction we will need:
a datalist to define input (can be replace bby a an nxtomomill widget if the data was not converted already)
dark and flat field widget
axis widget (to compute the center of rotation)
nabu widget for the reconstruction
data viewer
adding data list widget¶
From the click on the ‘data list’ icon (contained in the control section)
The ‘data list’ widget should be added to the canvas.
adding dark and flat field widget¶
Now click on the ‘dark and flat field’ icon from the reconstruction toolbox to add the ‘dark and flat field widget’.
Once added you can connect both on pressing on datalist ‘right arc circle’ - keeping mouse left button pressed and releasing it once the cursor is on the ‘left arc circle’ dark and flat field widget.
This widget can be tuned. To tune the widget double click on it and the interface should appear
From the interface to can select the method to comput dark and flat fields for example. You can ‘close’ the widget or let it open. Settings are applied ‘live’.
adding the axis widget¶
Do the same for the axis widget
Then open the widget (double click on it).
You can see default center of rotation to see how to configure this widget.
For this example we know the center of rotation is at +78 so we select the ‘manual mode’ and lock the value (locker close to…)
When the dataset will reach this process it will directly record this value as the center of rotation value.
nabu widget¶
To add the nabu widget continue to double click on the requested widget from toolbox. And connect the nabu widget with the axis widget. As the ‘center of rotation’ will be processed before nabu will be able to benefit from it.
And you can tune the nabu reconstruction following nabu slice reconstruction.
In this case we simply want to run ‘full field imaging’ reconstruction on slices 20 and 50. We also apply the ‘double flat field correction’ to remove some of the ring artifact.
data viewer¶
As we want to see reconstructed slice we can also add a ‘data viewer’ after the nabu widget.
Launching the workflow¶
Now that your workflow is created and tune you can execute it. In this case you just have to open the ‘data list’ interface and press on ‘send’ button.
Each widget will process. Once process the link between widgets become an ‘unbroken line’. Some widget are also displaying an ‘advancement’ during processing.
It will process the entire workflow until the ‘viewer’. For the taken example at the end we can display the reconstruction from the viewer (double click on the widget):
Note
the viewer contains two tabs one to displays reconstructed slices (‘Reconstruction’) and one to display dataset projections (‘Radios’).
Adding some elements¶
If you like you can add some processing. Like the ‘sinogram viewer’ to display the sinogram. It keep in memory the last dataset processed so you won’t need to press on ‘send’ again.
Saving and loading the workflow¶
If you like to re-execute this workflow you can save this workflow. For this click on File > Save as and give a name to the workflow. Widget settings will also be saved in the .ows file. To open it you can click on File > Open.