radon

acstools.utils_findsat_mrt.radon(image, theta=None, circle=False, *, preserve_range=False, fill_value=nan, median=True, processes=1, return_length=False, print_calc_times=False)

Calculates the (median) radon transform of an image.

This routine basically skimage.transform.radon() but with extra options and multiprocessing. For further information see [1] and [2].

Parameters:
imagearray-like

Input image. The rotation axis will be located in the pixel with indices (image.shape[0] // 2, image.shape[1] // 2).

thetaarray-like, optional

Projection angles (in degrees). If None, the value is set to np.arange(180).

circlebool, optional

Assume image is zero outside the inscribed circle, making the width of each projection (the first dimension of the sinogram) equal to min(image.shape).

preserve_rangebool, optional

Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html

fill_valuefloat, optional

Value to use for regions where the transform could not be calculated. Default is 0.

median: bool, optional

Flag to turn on Median Radon Transform instead of standard Radon Transform. Default is True.

processes: int, optional

Number of processes to use when calculating the transform. Default is 1 (no multi-processing).

return_lengthbool, optional

Option to return an array giving the length of the data array used to calculate the transform at every location. Default is False.

print_calc_timesbool, optional

Log the run time.

Returns:
radon_imagendarray

Radon transform (sinogram). The tomography rotation axis will lie at the pixel index radon_image.shape[0] // 2 along the 0th dimension of radon_image.

length: ndarray, optional

Length of data array. This is only returned if return_length is True.

Raises:
ValueError

Input image is not 2-D or padded image is not square.

Notes

Based on code of Justin K. Romberg

References

[1]

AC Kak, M Slaney, “Principles of Computerized Tomographic Imaging”, IEEE Press 1988.

[2]

B.R. Ramesh, N. Srinivasa, K. Rajgopal, “An Algorithm for Computing the Discrete Radon Transform With Some Applications”, Proceedings of the Fourth IEEE Region 10 International Conference, TENCON ‘89, 1989