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 tonp.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] // 2along the 0th dimension ofradon_image.- length: ndarray, optional
Length of data array. This is only returned if
return_lengthisTrue.
- Raises:
- ValueError
Input image is not 2-D or padded image is not square.
Notes
Based on code of Justin K. Romberg
References