Skip to content

Commit 6b7a3fc

Browse files
committed
adding info on the log-polar method
1 parent f9b35c6 commit 6b7a3fc

File tree

9 files changed

+64
-12
lines changed

9 files changed

+64
-12
lines changed
149 KB
Loading
111 KB
Loading
78.3 KB
Loading
132 KB
Loading
125 KB
Loading

docs/source/reference/methods_list/reconstruction/FBP2d_astra.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.. _method_FBP2d_astra:
22

3-
FBP using ASTRA-Toolbox
4-
^^^^^^^^^^^^^^^^^^^^^^^
3+
FBP2D (ASTRA-Toolbox)
4+
^^^^^^^^^^^^^^^^^^^^^
55

66
**Description**
77

88
This module performs Filtered-Back-projection direct reconstruction using `ASTRA-Toolbox <https://astra-toolbox.com>`_. It is an implementation of parallel-beam
9-
`FBP <https://astra-toolbox.com/docs/algs/FBP.html>`_ reconstruction method by ASTRA with the related parameters exposed (see the adjustable parameters bellow).
9+
`FBP_CUDA <https://astra-toolbox.com/docs/algs/FBP_CUDA.html>`_ reconstruction method by ASTRA with the related parameters exposed (see the adjustable parameters bellow).
1010

1111

1212
.. note:: This is the slowest direct reconstruction method in the library and it is recommended to use other methods, such as, :ref:`method_FBP3d_tomobar` or :ref:`method_LPRec3d_tomobar`.

docs/source/reference/methods_list/reconstruction/LPRec3d_tomobar.rst

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,64 @@ Log-Polar 3D (ToMoBAR)
55

66
**Description**
77

8+
The Log-Polar method is especially useful for implementing filtered back-projection (FBP) and Fourier-based reconstruction techniques via Fourier Slice Theorem aka `Projection-Slice Throrem <https://en.wikipedia.org/wiki/Projection-slice_theorem>`_.
9+
It is normally the fastest reconstruction method, as it allows Fast Fourier Transform (FFT) computations. Instead of working in standard Cartesian coordinates, the projection data (Radon transform) is mapped into log-polar coordinates, where scaling and rotation become
10+
simpler transformations, see more :cite:`andersson2016fast`. The method is implemented in `ToMoBAR <https://dkazanc.github.io/ToMoBAR>`_ software :cite:`kazantsev2020tomographic` using CuPy API and exposed in HTTomolibGPU. It also optimised to work with
11+
the 3D projection data, hence the name of the method.
812

913
**Where and how to use it:**
1014

15+
It is the fastest direct method in the library compared to :ref:`method_FBP3d_tomobar` and :ref:`method_FBP2d_astra`. The Log-Polar accuracy is comparable to FBP if the data is well-sampled and evenly spaced. However, for poor/uneven-sampled
16+
projection data it is generally to recommend to use FBP methods to avoid interpolation errors during coordinate transformation. Arguably, the reconstruction errors (artifacts) can be minor and generally not visible.
17+
The Log-Polar can be used as a first choice method for fast reconstruction followed by :ref:`method_FBP3d_tomobar`.
1118

1219
**What are the adjustable parameters:**
1320

21+
Most of parameters are self-explanatory from the method's API :mod:`httomolibgpu.recon.algorithm.LPRec3d_tomobar`, so we will mention only the ones that need more explanation.
1422

15-
**Practical example:**
23+
* :code:`detector_pad` This parameter is responsible for padding of both (left/right) sides of the horizontal detector of each radiograph. This type of padding extend the edge assuming the sample outside the field of view is approximately similar. This should be used in cases when the sample is larger than the field of view or when the halo-type artifacts should be minimised.
1624

25+
.. list-table::
26+
27+
28+
* - .. figure:: ../../../_static/figures/reconstructions/lprec_recon_no_pad.png
29+
:width: 300px
30+
31+
Reconstruction using Log-Polar method without detector padding :code:`detector_pad=0`.
32+
33+
- .. figure:: ../../../_static/figures/reconstructions/lprec_recon_pad.png
34+
:width: 300px
35+
36+
Reconstruction using detector padding :code:`detector_pad=300`. See that the halo artifacts were removed.
37+
38+
39+
* :code:`recon_mask_radius` This applies the circular mask to the reconstructed volume by zeroing all data outside a certain radius.
40+
41+
.. list-table::
42+
43+
44+
* - .. figure:: ../../../_static/figures/reconstructions/lprec_recon_no_pad.png
45+
:width: 300px
46+
47+
Reconstruction with the mask :code:`recon_mask_radius=2.0`.
48+
49+
- .. figure:: ../../../_static/figures/reconstructions/lprec_recon_mask.png
50+
:width: 300px
51+
52+
Reconstruction with the mask :code:`recon_mask_radius=0.78`.
53+
54+
55+
* :code:`filter_type` and :code:`filter_freq_cutoff` control the type of filter and the cut-off frequency applied. Different results therefore can be achieved, for instance, when noise is either accentuated or suppressed.
56+
57+
.. list-table::
58+
59+
60+
* - .. figure:: ../../../_static/figures/reconstructions/lprec_recon_filter_hann.png
61+
:width: 300px
62+
63+
Reconstruction using :code:`filter_type = 'hann'` and :code:`filter_freq_cutoff=1.0`.
64+
65+
- .. figure:: ../../../_static/figures/reconstructions/lprec_recon_filter_parzen.png
66+
:width: 300px
67+
68+
Reconstruction using :code:`filter_type = 'parzen'` and :code:`filter_freq_cutoff=1.5`.

docs/source/reference/methods_list/reconstruction_methods.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Image reconstruction methods
44
****************************
55

66
Methods from :mod:`httomolibgpu.recon.algorithm` module are required to reconstruct the projection data, i.e., converting the set of sinograms into a reconstructed volume.
7-
The reconstruction methods can be divided into two groups: Direct methods and Iterative methods.
7+
The reconstruction methods can be divided into two groups: Direct (analytical) methods and Iterative methods.
88
The former are faster and suitable for the majority of well-sampled and well-exposed data.
9-
The latter are more complex and slower methods suitable for erroneuos or/and undersampled data.
9+
The latter are more complex and slower methods suitable for erroneous or/and undersampled data.
1010

1111
.. toctree::
1212
:maxdepth: 2

httomolibgpu/recon/algorithm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Created By : Tomography Team at DLS <[email protected]>
1919
# Changes relative to ToMoBAR 2024.01 version
2020
# ---------------------------------------------------------------------------
21-
"""Module for tomographic reconstruction"""
21+
"""Module for tomographic reconstruction. For more detailed information see :ref:`image_reconstruction_module`"""
2222

2323
import numpy as np
2424
from httomolibgpu import cupywrapper
@@ -71,8 +71,7 @@ def FBP2d_astra(
7171
"""
7272
Perform Filtered Backprojection (FBP) reconstruction slice-by-slice (2d) using ASTRA toolbox :cite:`van2016fast` and
7373
ToMoBAR :cite:`kazantsev2020tomographic` wrappers.
74-
This is a 2D recon using ASTRA's API for the FBP method, see for more parameters ASTRA's documentation here:
75-
https://astra-toolbox.com/docs/algs/FBP_CUDA.html.
74+
This is a 2D recon using ASTRA's API for the FBP_CUDA method, see more in :ref:`method_FBP2d_astra`.
7675
7776
Parameters
7877
----------
@@ -153,7 +152,8 @@ def FBP3d_tomobar(
153152
"""
154153
Perform Filtered Backprojection (FBP) reconstruction using ASTRA toolbox :cite:`van2016fast` and
155154
ToMoBAR :cite:`kazantsev2020tomographic` wrappers.
156-
This is a 3D recon from the CuPy array directly and using a custom built SINC filter for filtration in Fourier space.
155+
This is a 3D recon from the CuPy array directly and using a custom built SINC filter for filtration in Fourier space,
156+
see more in :ref:`method_FBP3d_tomobar`.
157157
158158
Parameters
159159
----------
@@ -216,7 +216,7 @@ def LPRec3d_tomobar(
216216
"""
217217
Fourier direct inversion in 3D on unequally spaced (also called as Log-Polar) grids using
218218
CuPy array as an input. This implementation follows V. Nikitin's CUDA-C implementation and TomoCuPy package.
219-
:cite:`andersson2016fast`.
219+
:cite:`andersson2016fast`, see more in :ref:`method_LPRec3d_tomobar`.
220220
221221
Parameters
222222
----------
@@ -231,7 +231,7 @@ def LPRec3d_tomobar(
231231
filter_type : str
232232
Filter type, the accepted strings are: none, ramp, shepp, cosine, cosine2, hamming, hann, parzen.
233233
filter_freq_cutoff : float
234-
Cutoff frequency parameter for a filter. The higher values increase the resolution but also amplify the noise.
234+
Cutoff frequency parameter for a filter.
235235
recon_size : int, optional
236236
The [recon_size, recon_size] shape of the reconstructed slice in pixels.
237237
By default (None), the reconstructed size will be the dimension of the horizontal detector.

0 commit comments

Comments
 (0)