httomolibgpu.prep.stripe
#
Modules for stripes removal
- httomolibgpu.prep.stripe.remove_all_stripe(data: <cp.ndarray>, snr: float = 3.0, la_size: int = 61, sm_size: int = 21, dim: int = 1) <cp.ndarray> [source]#
Remove all types of stripe artifacts from sinogram using Nghia Vo’s approach, see [8] (combination of algorithm 3,4,5, and 6).
- Parameters
data (ndarray) – 3D tomographic data as a CuPy array.
snr (float, optional) – Ratio used to locate large stripes. Greater is less sensitive.
la_size (int, optional) – Window size of the median filter to remove large stripes.
sm_size (int, optional) – Window size of the median filter to remove small-to-medium stripes.
dim ({1, 2}, optional) – Dimension of the window.
- Returns
Corrected 3D tomographic data as a CuPy or NumPy array.
- Return type
ndarray
- httomolibgpu.prep.stripe.remove_stripe_based_sorting(data: typing.Union[<cp.ndarray>, <cp.ndarray>], size: int = 11, dim: int = 1) Union[<cp.ndarray>, <cp.ndarray>] [source]#
Remove full and partial stripe artifacts from sinogram using Nghia Vo’s approach, see [8]. This algorithm works particularly well for removing partial stripes.
Steps of the algorithm: 1. Sort each column of the sinogram by its grayscale values. 2. Apply a smoothing (median) filter on the sorted image along each row. 3. Re-sort the smoothed image columns to the original rows to get the corrected sinogram.
- Parameters
data (ndarray) – 3D tomographic data as a CuPy or NumPy array.
size (int, optional) – Window size of the median filter.
dim ({1, 2}, optional) – Dimension of the window.
- Returns
Corrected 3D tomographic data as a CuPy or NumPy array.
- Return type
ndarray
- httomolibgpu.prep.stripe.remove_stripe_ti(data: typing.Union[<cp.ndarray>, <cp.ndarray>], beta: float = 0.1) Union[<cp.ndarray>, <cp.ndarray>] [source]#
Removes stripes with the method of V. Titarenko (TomoCuPy implementation). See [5].
- Parameters
data (ndarray) – 3D stack of projections as a CuPy array.
beta (float, optional) – filter parameter, lower values increase the filter strength. Default is 0.1.
- Returns
3D array of de-striped projections.
- Return type
ndarray