fanbeam() - Image Processing
F = fanbeam(I,D) computes
the fan-beam projection data (sinogram) F from
the image I. D is the distance in pixels from the fan-beam
vertex to the center of rotation. The center of rotation is the center
pixel of the image, defined as floor((size(I)+1)/2). D must
be large enough to ensure that the fan-beam vertex is outside of the
image at all rotation angles. See Tips for guidelines on specifying D.
The following figure illustrates D in relation to the fan-beam vertex
for one fan-beam geometry. See the FanSensorGeometry parameter
for more information.
Each column of F contains the fan-beam sensor
samples at one rotation angle. The number of columns in F is
determined by the fan rotation increment. By default, the fan rotation
increment is 1 degree so F has 360 columns. The number of rows in F is determined by
the number of sensors. fanbeam determines the number
of sensors by calculating how many beams are required to cover the
entire image for any rotation angle.For information about how to specify the rotation increment
and sensor spacing, see the documentation for the FanRotationIncrement and FanSensorSpacing parameters,
below.F = fanbeam(..., param1, val1, param1,
val2,...) specifies parameters, listed below, that control
various aspects of the fan-beam projections. Parameter names can be
abbreviated, and case does not matter.'FanRotationIncrement' -- Positive real scalar
specifying the increment of the rotation angle of the fan-beam projections.
Measured in degrees. Default value is 1.'FanSensorGeometry' -- Text string specifying
how sensors are positioned. Valid values are 'arc' or 'line'.
In the 'arc' geometry, sensors are spaced equally
along a circular arc, as shown below. This is the default value.
In 'line' geometry, sensors are spaced equally
along a line, as shown below.
'FanSensorSpacing' -- Positive real scalar
specifying the spacing of the fan-beam sensors. Interpretation of
the value depends on the setting of 'FanSensorGeometry'.
If 'FanSensorGeometry' is set to 'arc' (the
default), the value defines the angular spacing in degrees. Default
value is 1. If 'FanSensorGeometry' is 'line',
the value specifies the linear spacing. Default value is 1.Note
This linear spacing is measured on the x' axis.
The x' axis for each column, col,
of F is oriented at fan_rotation_angles(col) degrees
counterclockwise from the x-axis. The origin of both axes is the center
pixel of the image.[F, fan_sensor_positions, fan_rotation_angles]
= fanbeam(...) returns the location of fan-beam sensors
in fan_sensor_positions and the rotation angles where the fan-beam
projections are calculated in fan_rotation_angles. If 'FanSensorGeometry' is 'arc' (the
default), fan_sensor_positions contains the fan-beam spread angles.
If 'FanSensorGeometry' is 'line',
fan_sensor_positions contains the fan-beam sensor positions along
the x' axis. See 'FanSensorSpacing' for
more information.
Syntax
F = fanbeam(I,D)F = fanbeam(..., param1, val1, param1,
val2,...)[F, fan_sensor_positions, fan_rotation_angles]
= fanbeam(...)
Example
iptsetpref('ImshowAxesVisible','on')
ph = phantom(128);
imshow(ph)
[F,Fpos,Fangles] = fanbeam(ph,250);
figure
imshow(F,[],'XData',Fangles,'YData',Fpos,...
'InitialMagnification','fit')
axis normal
xlabel('Rotation Angles (degrees)')
ylabel('Sensor Positions (degrees)')
colormap(hot), colorbar
Output / Return Value
Limitations
Alternatives / See Also
Reference