Documentation

iradon

Inverse Radon transform

Syntax

I = iradon(R,theta)
I = iradon(R,theta,interp,filter,frequency_scaling,output_size)
[I,H] = iradon(___)
[gpuarrayI,gpuarrayH] = iradon(gpuarrayR,theta)
[gpuarrayI,gpuarrayH] = iradon(gpuarrayR,theta,interp,filter,frequency_scaling,output_size)

Description

example

I= iradon(R,theta)reconstructs the imageIfrom projection data in the two-dimensional arrayR. The columns ofRare parallel beam projection data.thetadescribes the angles (in degrees) at which the projections were taken.

I= iradon(R,theta,interp,filter,frequency_scaling,output_size)specifies parameters to use in the inverse Radon transform. You can specify any combination of the last four arguments.iradonuses default values for any of these arguments that you omit.

[I,H] = iradon(___)returns the frequency response of the filter in the vectorH.

example

[gpuarrayI,gpuarrayH] = iradon(gpuarrayR,theta)reconstructs the image using a GPU. This syntax requires the Parallel Computing Toolbox™.

example

[gpuarrayI,gpuarrayH] = iradon(gpuarrayR,theta,interp,filter,frequency_scaling,output_size)reconstructs the image using a GPU. You can specify any combination of the last four arguments. This syntax requires the Parallel Computing Toolbox.

Note

The GPU implementation of this function supports only nearest-neighbor and linear interpolation methods for the back projection.

Examples

collapse all

Create an image of the phantom. Display the image.

P = phantom(128); imshow(P) title('Original image')

Perform a Radon transform of the image.

R = radon(P,0:179);

Perform filtered backprojection.

I1 = iradon(R,0:179);

Perform unfiltered backprojection.

I2 = iradon(R,0:179,'linear','none');

Display the reconstructed images.

figure subplot(1,2,1) imshow(I1,[]) title('Filtered Backprojection') subplot(1,2,2) imshow(I2,[]) title('Unfiltered Backprojection')

Create an image of the phantom.

P = phantom(128);

Perform a Radon transform of the image, then get the projection vector corresponding to a projection at a 45 degree angle.

R = radon(P,0:179); r45 = R(:,46);

Perform the inverse Radon transform of this single projection vector. Theiradonsyntax does not allow you to do this directly, because ifthetais a scalar it is treated as an increment. You can accomplish the task by passing in two copies of the projection vector and then dividing the result by 2.

I = iradon([r45 r45], [45 45])/2;

Display the result.

imshow(I, []) title('Backprojection from 45 degrees')

Calculate the inverse Radon transform on a GPU.

P = gpuArray(phantom(128)); R = radon(P,0:179); I1 = iradon(R,0:179); I2 = iradon(R,0:179,'linear','none'); subplot(1,3,1), imshow(P), title('Original') subplot(1,3,2), imshow(I1), title('Filtered backprojection') subplot(1,3,3), imshow(I2,[]), title('Unfiltered backprojection')

Input Arguments

collapse all

Parallel beam projection data, specified as one of the following.

  • Ifthetais a scalar, then specifyRas a numeric column vector containing the Radon transform forthetadegrees.

  • Ifthetais a vector, then specifyRas a 2-D matrix in which each column is the Radon transform for one of the angles intheta.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|logical

Projection angles (in degrees), specified as one of the following.

Value Description
numeric vector Projection angles. There must be equal spacing between the angles.
numeric scalar Incremental angle between projections. Projections are taken at anglesm*theta, wherem = 0,1,2,...,size(R,2)-1.
[] Automatically set the incremental angle between projections to180/size(R,2)

If the input projection data isgpuarrayR, thenthetacan also be agpuArraycontaining a numeric scalar or vector.

Data Types:double

Type of interpolation to use in the back projection, specified as one of these values, listed in order of increasing accuracy and computational complexity.

Value

Description

'nearest'

Nearest-neighbor interpolation

'linear'

Linear interpolation (the default)

'spline'

Spline interpolation

'pchip' Shape-preserving piecewise cubic interpolation

If the input projection data isgpuarrayR, theninterpcan only be'nearest'or'linear'.

Data Types:char|string

Filter to use for frequency domain filtering, specified as one of these values.

Value

Description

'Ram-Lak'

Cropped Ram-Lak or ramp filter. The frequency response of this filter is |f|. Because this filter is sensitive to noise in the projections, one of the filters listed below might be preferable. These filters multiply the Ram-Lak filter by a window that deemphasizes high frequencies.

'Shepp-Logan'

Multiplies the Ram-Lak filter by asincfunction

'Cosine'

Multiplies the Ram-Lak filter by acosinefunction

'Hamming'

Multiplies the Ram-Lak filter by a Hamming window

'Hann'

Multiplies the Ram-Lak filter by a Hann window

'None' No filtering. When you specify this value,iradon返回过滤backprojection data.

Data Types:char|string

Scale factor for rescaling the frequency axis, specified as a positive number in the range (0, 1]. Iffrequency_scalingis less than 1, the filter is compressed to fit into the frequency range[0,frequency_scaling], in normalized frequencies; all frequencies abovefrequency_scalingare set to0.

If the input projection data isgpuarrayR, thenfrequency_scalingcan also be agpuArraycontaining a positive number in the range (0, 1].

Number of rows and columns in the reconstructed image, specified as a positive integer. Ifoutput_sizeis not specified, the size is determined from the length of the projections according to:

output_size = 2*floor(size(R,1)/(2*sqrt(2)))

If you specifyoutput_size,iradonreconstructs a smaller or larger portion of the image but does not change the scaling of the data. If the projections were calculated with theradonfunction, the reconstructed image might not be the same size as the original image.

If the input projection data isgpuarrayR, thenoutput_sizecan also be agpuArraycontaining a positive integer.

Parallel beam projection data when run on a GPU, specified as a 2-DgpuArray.

Output Arguments

collapse all

Grayscale image, returned as a numeric matrix. If input projection dataRis data typesingle, thenIissingle; otherwiseIisdouble.

Data Types:single|double

Frequency response of the filter, returned as a numeric vector.

Data Types:double

Grayscale image when run on a GPU, returned as a 2-DgpuArray.

Frequency response when run on a GPU, returned as agpuArray.

Algorithms

iradonassumes that the center of rotation is the center point of the projections, which is defined asceil(size(R,1)/2).

iradonuses the filtered back projection algorithm to perform the inverse Radon transform. The filter is designed directly in the frequency domain and then multiplied by the FFT of the projections. The projections are zero-padded to a power of 2 before filtering to prevent spatial domain aliasing and to speed up the FFT.

References

[1] Kak, A. C., and M. Slaney, Principles of Computerized Tomographic Imaging, New York, NY, IEEE Press, 1988.

Introduced before R2006a

Was this topic helpful?