Main Content

Fan-Beam Projection

Note

For information about creating projection data from line integrals along parallel paths, seeRadon Transform. To convert fan-beam projection data to parallel-beam projection data, use thefan2parafunction.

Thefanbeamfunction computes预测of an image matrix along specified directions. A projection of a two-dimensional functionf(x,y)is a set of line integrals. Thefanbeamfunction computes the line integrals along paths that radiate from a single source, forming a fan shape. To represent an image, thefanbeamfunction takes multiple projections of the image from different angles by rotating the source around the center of the image. The following figure shows a single fan-beam projection at a specified rotation angle.

Fan-Beam Projection at Rotation Angle Theta

When you compute fan-beam projection data using thefanbeamfunction, you specify as arguments an image and the distance between the vertex of the fan-beam projections and the center of rotation (the center pixel in the image). Thefanbeamfunction determines the number of beams, based on the size of the image and the settings offanbeam参数s.

TheFanSensorGeometry参数specifies how sensors are aligned:'arc'or'line'.

Fan Sensor Geometry Description
'arc' fanbeampositions the sensors along an arc, spacing the sensors at 1 degree intervals. Use theFanSensorSpacing参数to control the distance between sensors by specifying the angle between each beam. This is the default fan sensor geometry.
'line' fanbeampositions sensors along a straight line, rather than an arc. Use theFanSensorSpacing参数to specify the distance between the sensors, in pixels, along thex´ axis.

TheFanRotationIncrement参数specifies the rotation angle increment. By default,fanbeamtakes projections at different angles by rotating the source around the center pixel at 1 degree intervals.

The following figures illustrate both these geometries. The first figure illustrates geometry used by thefanbeamfunction whenFanSensorGeometryis set to'arc'(the default). Note how you specify the distance between sensors by specifying the angular spacing of the beams.

Fan-Beam Projection with Arc Geometry

The following figure illustrates the geometry used by thefanbeamfunction whenFanSensorGeometryis set to'line'. In this figure, note how you specify the position of the sensors by specifying the distance between them in pixels along thex´ axis.

Fan-Beam Projection with Line Geometry

Image Reconstruction from Fan-Beam Projection Data

To reconstruct an image from fan-beam projection data, use theifanbeamfunction. With this function, you specify as arguments the projection data and the distance between the vertex of the fan-beam projections and the center of rotation when the projection data was created. For example, this code recreates the imageIfrom the projection dataPand distanceD.

I = ifanbeam(P,D);

By default, theifanbeamfunction assumes that the fan-beam projection data was created using the arc fan sensor geometry, with beams spaced at 1 degree angles and projections taken at 1 degree increments over a full 360 degree range. As with thefanbeamfunction, you can useifanbeam参数s to specify other values for these characteristics of the projection data. Use the same values for these parameters that were used when the projection data was created. For more information about these parameters, seeifanbeam.

Theifanbeamfunction converts the fan-beam projection data to parallel-beam projection data with thefan2parafunction, and then calls theiradonfunction to perform the image reconstruction. For this reason, theifanfeamfunction supports certainiradon参数s, which it passes to theiradonfunction. SeeThe Inverse Radon Transformationfor more information about theiradonfunction.

Reconstruct Image using Inverse Fanbeam Projection

This example shows how to usefanbeamandifanbeamto form projections from a sample image and then reconstruct the image from the projections.

Generate a test image and display it. The test image is the Shepp-Logan head phantom, which can be generated by thephantomfunction. The phantom image illustrates many of the qualities that are found in real-world tomographic imaging of human heads.

P = phantom(256); imshow(P)

Figure contains an axes object. The axes object contains an object of type image.

Compute fan-beam projection data of the test image, using theFanSensorSpacing参数to vary the sensor spacing. The example uses the fanbeam arc geometry, so you specify the spacing between sensors by specifying the angular spacing of the beams. The first call spaces the beams at 2 degrees; the second at 1 degree; and the third at 0.25 degrees. In each call, the distance between the center of rotation and vertex of the projections is constant at 250 pixels. In addition,fanbeamrotates the projection around the center pixel at 1 degree increments.

D = 250; dsensor1 = 2; F1 = fanbeam(P,D,'FanSensorSpacing',dsensor1); dsensor2 = 1; F2 = fanbeam(P,D,'FanSensorSpacing',dsensor2); dsensor3 = 0.25; [F3, sensor_pos3, fan_rot_angles3] = fanbeam(P,D,...'FanSensorSpacing',dsensor3);

Plot the projection dataF3. Becausefanbeamcalculates projection data at rotation angles from 0 to 360 degrees, the same patterns occur at an offset of 180 degrees. The same features are being sampled from both sides.

figure, imagesc(fan_rot_angles3, sensor_pos3, F3) colormap(hot); colorbar xlabel('Fan Rotation Angle (degrees)') ylabel('Fan Sensor Position (degrees)')

Figure contains an axes object. The axes object contains an object of type image.

Reconstruct the image from the fan-beam projection data usingifanbeam. In each reconstruction, match the fan sensor spacing with the spacing used when the projection data was created previously. The example uses theOutputSize参数约束的输出大小of each reconstruction to be the same as the size of the original imageP. In the output, note how the quality of the reconstruction gets better as the number of beams in the projection increases. The first image,Ifan1, was created using 2 degree spacing of the beams; the second image,Ifan2, was created using 1 degree spacing of the beams; the third image,Ifan3, was created using 0.25 spacing of the beams.

output_size = max(size(P)); Ifan1 = ifanbeam(F1,D,...'FanSensorSpacing',dsensor1,'OutputSize',output_size); figure, imshow(Ifan1) title('Ifan1')

Figure contains an axes object. The axes object with title Ifan1 contains an object of type image.

Ifan2 = ifanbeam(F2,D,...'FanSensorSpacing',dsensor2,'OutputSize',output_size); figure, imshow(Ifan2) title('Ifan2')

Figure contains an axes object. The axes object with title Ifan2 contains an object of type image.

Ifan3 = ifanbeam(F3,D,...'FanSensorSpacing',dsensor3,'OutputSize',output_size); figure, imshow(Ifan3) title('Ifan3')

Figure contains an axes object. The axes object with title Ifan3 contains an object of type image.