Main Content

ifanbeam

Inverse fan-beam transform

Description

example

I = ifanbeam(F,D) reconstructs the image I from fan-beam projection data in F. Each column of F contains fan-beam projection data at one rotation angle. The angle between sensors is assumed to be uniform and equal to the increment between fan-beam rotation angles. D is the distance from the fan-beam vertex to the center of rotation.

example

I = ifanbeam(F,D,Name,Value) uses name-value arguments to control various aspects of the reconstruction.

[I,H] = ifanbeam(___) also returns the frequency response of the filter, H.

Examples

collapse all

Create a sample image. The phantom function creates a phantom head image.

ph = phantom(128);

Create a fan-beam transformation of the phantom head image.

d = 100;
F = fanbeam(ph,d);

Reconstitute the phantom head image from the fan-beam representation. Display the original image and the reconstituted image.

I = ifanbeam(F,d);
imshow(ph)

figure
imshow(I);

Create a sample image. The phantom function creates a phantom head image.

ph = phantom(128);

Create a radon transformation of the image.

P = radon(ph);

Convert the transformation from parallel beam projection to fan-beam projection.

[F,obeta,otheta] = para2fan(P,100,... 
                            'FanSensorSpacing',0.5,...
                            'FanCoverage','minimal',...
                            'FanRotationIncrement',1);

Reconstitute the image from fan-beam data.

phReconstructed = ifanbeam(F,100,... 
                           'FanSensorSpacing',0.5,...
                           'Filter','Shepp-Logan',...
                           'OutputSize',128,... 
                           'FanCoverage','minimal',...
                           'FanRotationIncrement',1);

Display the original and the transformed image.

imshow(ph)

figure
imshow(phReconstructed)

Input Arguments

collapse all

Fan-beam projection data, specified as a numSensors-by-numAngles numeric matrix. numSensors is the number of fan-beam sensors and numAngles is the number of fan-beam rotation angles. Each column of F contains the fan-beam sensor samples at one rotation angle.

Data Types: double | single

Distance in pixels from the fan-beam vertex to the center of rotation, specified as a positive number. ifanbeam assumes that the center of rotation is the center point of the projections, which is defined as ceil(size(F,1)/2).

Fan-beam image geometry highlighting the distance D between the fan-beam vertex and the center of rotation

Data Types: double | single

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: I = ifanbeam(F,D,FanRotationIncrement=5) specifies a fan rotation increment of 5 degrees.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: I = ifanbeam(F,D,"FanRotationIncrement",5) specifies a fan rotation increment of 5 degrees.

Range of fan-beam rotation, specified as "cycle" or "minimal".

  • "cycle" — Rotate through the full range [0, 360) degrees.

  • "minimal" — Rotate through the minimum range necessary to represent the object.

Fan-beam rotation angle increment in degrees, specified as a positive scalar.

Fan-beam image geometry highlighting the angular separation of two successive fan-beam vertices by FanRotationIncrement degrees.

Data Types: double

Fan-beam sensor positioning, specified as "arc" or "line".

Value

Meaning

Diagram

"arc"

Sensors are spaced at equal angles along a circular arc. The center of the arc is the fan-beam vertex.

FanSensorSpacing defines the angular spacing in degrees.

Fan-beam image geometry highlighting the constant angular spacing between sensors in an arc

"line"

Sensors are spaced at equal distances along a line that is parallel to the x' axis. The closest sensor is distance D from the center of rotation.

FanSensorSpacing defines the distance between fan-beams on the x' axis, in pixels.

Fan-beam image geometry highlighting the constant distance between sensors in a line

Fan-bean sensor spacing, specified as a positive scalar.

  • If FanSensorGeometry is "arc", then FanSensorSpacing defines the angular spacing in degrees.

  • If FanSensorGeometry is "line", then FanSensorSpacing defines the linear distance between fan-beams, in pixels. Linear spacing is measured on the x' axis.

Data Types: double

Filter to use for frequency domain filtering, specified as one of the values in the table. For more information, see iradon.

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 de-emphasizes high frequencies.

"Shepp-Logan"

Multiplies the Ram-Lak filter by a sinc function

"Cosine"

Multiplies the Ram-Lak filter by a cosine function

"Hamming"

Multiplies the Ram-Lak filter by a Hamming window

"Hann"

Multiplies the Ram-Lak filter by a Hann window

"None"No filtering. ifanbeam returns unfiltered data.

Data Types: char | string

Scale factor for rescaling the frequency axis, specified as a positive number in the range (0, 1]. If FrequencyScaling is less than 1, then the filter is compressed to fit into the frequency range [0, FrequencyScaling], in normalized frequencies; all frequencies above FrequencyScaling are set to 0. For more information, see iradon.

Data Types: double

Type of interpolation used between the parallel-beam and fan-beam data, specified as one of these values.

"nearest" — Nearest-neighbor

"linear" — Linear (the default)

"spline" — Piecewise cubic spline

"pchip" — Piecewise cubic Hermite (PCHIP)

Data Types: char | string

Size of the reconstructed image, specified as a positive integer. The image has an equal number of rows and columns.

If you specify OutputSize, then ifanbeam reconstructs a smaller or larger portion of the image but does not change the scaling of the data.

Note

If the projections were calculated with the fanbeam function, then the reconstructed image might not be the same size as the original image.

If you do not specify OutputSize, then the size is calculated automatically by:

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

where R is the length of parallel-beam projection data used by iradon. For more information, see Algorithms.

Data Types: double

Output Arguments

collapse all

Reconstructed image, specified as a 2-D numeric matrix.

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

Data Types: double

Tips

  • To perform an inverse fan-beam reconstruction, you must give ifanbeam the same parameters that were used to calculate the projection data, F. If you use fanbeam to calculate the projection, then make sure the parameters are consistent when calling ifanbeam.

Algorithms

ifanbeam converts the fan-beam data to parallel beam projections and then uses 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, Avinash C., and Malcolm Slaney. Principles of Computerized Tomographic Imaging. New York: IEEE Press, 1988.

Version History

Introduced before R2006a