Convert parallelbeam projections to fanbeam
F = para2fan(P, D)
I = para2fan(..., param1, val1, param2,
val2,...)
[F, fan_positions, fan_rotation_angles]
= fan2para(...)
F = para2fan(P, D)
converts
the parallelbeam data P
to the fanbeam data F
.
Each column of P
contains the parallelbeam sensor
samples at one rotation angle. D
is the distance
in pixels from the fanbeam vertex to the center of rotation that
was used to obtain the projections.
The sensors are assumed to have a onepixel spacing. The parallelbeam rotation angles are assumed to be spaced equally to cover [0,180] degrees. The calculated fanbeam rotation angles cover [0,360) with the same spacing as the parallelbeam rotation angles. The calculated fanbeam angles are equally spaced with the spacing set to the smallest angle implied by the sensor spacing.
I = para2fan(..., param1, val1, param2,
val2,...)
specifies parameters that control various aspects
of the para2fan
conversion. Parameter names can
be abbreviated, and case does not matter. Default values are enclosed
in braces like this: {default}. Parameters include
Parameter  Description 

 String specifying the range of rotation angles used to calculate the projection data F. Possible values: See 
 Positive real scalar specifying the rotation angle increment of the fanbeam projections in degrees. If If 
 String specifying how sensors are positioned. Possible
values: See 
 Positive real scalar specifying the spacing of the fan
beams. Interpretation of the value depends on the setting of If If If If 180/PI*ASIN(PSPACE/D) where If D*ASIN(PSPACE/D) 
 Text string specifying the type of interpolation used between the parallelbeam and fanbeam data.

 Text string specifying the range of rotation.

 Positive real scalar specifying the spacing of the parallelbeam sensors in pixels. The range of sensor locations is implied by the range of fan angles and is given by [D*sin(min(FAN_ANGLES)),D*sin(max(FAN_ANGLES))] If 
[F, fan_positions, fan_rotation_angles]
= fan2para(...)
returns the fanbeam sensor measurement angles in fan_positions
,
if 'FanSensorGeometry'
is 'arc'
.
If 'FanSensorGeometry
' is 'line'
, fan_positions
contains
the fanbeam sensor positions along the line
of sensors. fan_rotation_angles
contains rotation
angles.
P
and D
can be double
or single
,
and must be nonsparse. The other numeric input arguments must be double
.
The output arguments are double
.
Generate parallelbeam projections
ph = phantom(128); theta = 0:180; [P,xp] = radon(ph,theta); imshow(theta,xp,P,[],'n'), axis normal title('ParallelBeam Projections') xlabel('\theta (degrees)') ylabel('x''') colormap(hot), colorbar
Convert to fanbeam projections
[F,Fpos,Fangles] = para2fan(P,100); figure, imshow(Fangles,Fpos,F,[],'n'), axis normal title('FanBeam Projections') xlabel('\theta (degrees)') ylabel('Sensor Locations (degrees)') colormap(hot), colorbar