tomopy.prep.stripe
¶
Module for pre-processing tasks.
Functions:
|
Remove horizontal stripes from sinogram using the Fourier-Wavelet (FW) based method [B4]. |
|
Remove horizontal stripes from sinogram using Titarenko’s approach [B12]. |
|
Normalize raw projection data using a smoothing filter approach. |
|
Remove full and partial stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 3). |
|
Remove stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 2). |
|
Remove stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 1). |
|
Remove large stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 5). |
|
Remove unresponsive and fluctuating stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 6). |
|
Remove all types of stripe artifacts from sinogram using Nghia Vo’s approach [B23] (combination of algorithm 3,4,5, and 6). |
|
Remove most types of stripe artifacts from sinograms based on interpolation. |
- tomopy.prep.stripe.remove_all_stripe(tomo, snr=3, la_size=61, sm_size=21, dim=1, ncore=None, nchunk=None)[source]¶
Remove all types of stripe artifacts from sinogram using Nghia Vo’s approach [B23] (combination of algorithm 3,4,5, and 6).
- Parameters
tomo (ndarray) – 3D tomographic data.
snr (float) – Ratio used to locate large stripes. Greater is less sensitive.
la_size (int) – Window size of the median filter to remove large stripes.
sm_size (int) – Window size of the median filter to remove small-to-medium stripes.
dim ({1, 2}, optional) – Dimension of the window.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_dead_stripe(tomo, snr=3, size=51, norm=True, ncore=None, nchunk=None)[source]¶
Remove unresponsive and fluctuating stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 6).
- Parameters
tomo (ndarray) – 3D tomographic data.
snr (float) – Ratio used to detect locations of large stripes. Greater is less sensitive.
size (int) – Window size of the median filter.
norm (bool, optional) – Remove residual stripes if True.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_large_stripe(tomo, snr=3, size=51, drop_ratio=0.1, norm=True, ncore=None, nchunk=None)[source]¶
Remove large stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 5).
- Parameters
tomo (ndarray) – 3D tomographic data.
snr (float) – Ratio used to locate of large stripes. Greater is less sensitive.
size (int) – Window size of the median filter.
drop_ratio (float, optional) – Ratio of pixels to be dropped, which is used to reduce the false detection of stripes.
norm (bool, optional) – Apply normalization if True.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_based_filtering(tomo, sigma=3, size=None, dim=1, ncore=None, nchunk=None)[source]¶
Remove stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 2).
- Parameters
tomo (ndarray) – 3D tomographic data.
sigma (float) – Sigma of the Gaussian window which is used to separate the low-pass and high-pass components of the intensity profiles of each column. Recommended values: 3->10.
size (int) – Window size of the median filter.
dim ({1, 2}, optional) – Dimension of the window.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_based_fitting(tomo, order=3, sigma=(5, 20), ncore=None, nchunk=None)[source]¶
Remove stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 1). Suitable for removing low-pass stripes.
- Parameters
tomo (ndarray) – 3D tomographic data.
order (int) – Polynomial fit order. Recommended values: 1-> 5
sigma (tuple of 2 floats) – Sigmas of a 2D Gaussian window in x and y direction. Recommended values (3, 20) -> (10, 60).
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_based_interpolation(tomo, snr=3, size=31, drop_ratio=0.1, norm=True, ncore=None, nchunk=None)[source]¶
Remove most types of stripe artifacts from sinograms based on interpolation. Derived from algorithm 4, 5, and 6 in [B23].
- Parameters
tomo (ndarray) – 3D tomographic data.
snr (float) – Ratio used to segment between useful information and noise.
size (int) – Window size of the median filter used to detect stripes.
drop_ratio (float, optional) – Ratio of pixels to be dropped, which is used to to reduce the possibility of the false detection of stripes.
norm (bool, optional) – Apply normalization if True.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_based_sorting(tomo, size=None, dim=1, ncore=None, nchunk=None)[source]¶
Remove full and partial stripe artifacts from sinogram using Nghia Vo’s approach [B23] (algorithm 3). Suitable for removing partial stripes.
- Parameters
tomo (ndarray) – 3D tomographic data.
size (int) – Window size of the median filter.
dim ({1, 2}, optional) – Dimension of the window.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_fw(tomo, level=None, wname='db5', sigma=2, pad=True, ncore=None, nchunk=None)[source]¶
Remove horizontal stripes from sinogram using the Fourier-Wavelet (FW) based method [B4].
- Parameters
tomo (ndarray) – 3D tomographic data.
level (int, optional) – Number of discrete wavelet transform levels.
wname (str, optional) – Type of the wavelet filter. ‘haar’, ‘db5’, sym5’, etc.
sigma (float, optional) – Damping parameter in Fourier space.
pad (bool, optional) – If True, extend the size of the sinogram by padding with zeros.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_sf(tomo, size=5, ncore=None, nchunk=None)[source]¶
Normalize raw projection data using a smoothing filter approach.
- Parameters
tomo (ndarray) – 3D tomographic data.
size (int, optional) – Size of the smoothing filter.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.
- tomopy.prep.stripe.remove_stripe_ti(tomo, nblock=0, alpha=1.5, ncore=None, nchunk=None)[source]¶
Remove horizontal stripes from sinogram using Titarenko’s approach [B12].
- Parameters
tomo (ndarray) – 3D tomographic data.
nblock (int, optional) – Number of blocks.
alpha (int, optional) – Damping factor.
ncore (int, optional) – Number of cores that will be assigned to jobs.
nchunk (int, optional) – Chunk size for each core.
- Returns
ndarray – Corrected 3D tomographic data.