Documentation Center

  • Trial Software
  • Product Updates

para2fan

Convert parallel-beam projections to fan-beam

Syntax

F = para2fan(P, D)
I = para2fan(..., param1, val1, param2, val2,...)
[F, fan_positions, fan_rotation_angles] = fan2para(...)

Description

F = para2fan(P, D) converts the parallel-beam data P to the fan-beam data F. Each column of P contains the parallel-beam sensor samples at one rotation angle. D is the distance in pixels from the fan-beam vertex to the center of rotation that was used to obtain the projections.

The sensors are assumed to have a one-pixel spacing. The parallel-beam rotation angles are assumed to be spaced equally to cover [0,180] degrees. The calculated fan-beam rotation angles cover [0,360) with the same spacing as the parallel-beam rotation angles. The calculated fan-beam 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

'FanCoverage'

String specifying the range of rotation angles used to calculate the projection data F.

Possible values: {'cycle'} or 'minimal'

See ifanbeam for details.

'FanRotationIncrement'

Positive real scalar specifying the rotation angle increment of the fan-beam projections in degrees.

If 'FanCoverage' is 'cycle', 'FanRotationIncrement' must be a factor of 360.

If 'FanRotationIncrement' is not specified, then it is set to the same spacing as the parallel-beam rotation angles.

'FanSensorGeometry'

String specifying how sensors are positioned.

Possible values: {'arc'} or 'line'

See fanbeam for details.

'FanSensorSpacing'

Positive real scalar specifying the spacing of the fan beams. Interpretation of the value depends on the setting of 'FanSensorGeometry':

If 'FanSensorGeometry' is 'arc', the value defines the angular spacing in degrees. Default value is 1.

If 'FanSensorGeometry' is 'line', the value defines the linear spacing in pixels.

If 'FanSensorSpacing' is not specified, the default is the smallest value implied by 'ParallelSensorSpacing' such that

If 'FanSensorGeometry' is 'arc', 'FanSensorSpacing' is

  180/PI*ASIN(PSPACE/D)

where PSPACE is the value of 'ParallelSensorSpacing'.

If 'FanSensorGeometry' is 'line', 'FanSensorSpacing' is

 D*ASIN(PSPACE/D)

'Interpolation'

Text string specifying the type of interpolation used between the parallel-beam and fan-beam data.

'nearest' — Nearest-neighbor

{'linear'} — Linear

'spline' — Piecewise cubic spline

'pchip' — Piecewise cubic Hermite (PCHIP)

'v5cubic' — The cubic interpolation from MATLAB® 5

'ParallelCoverage'

Text string specifying the range of rotation.

'cycle' -- Parallel data covers 360 degrees

{'halfcycle'} — Parallel data covers 180 degrees

'ParallelSensorSpacing'

Positive real scalar specifying the spacing of the parallel-beam 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 'ParallelSensorSpacing' is not specified, the spacing is assumed to be uniform and is set to the minimum spacing implied by the fan angles and sampled over the range implied by the fan angles.

[F, fan_positions, fan_rotation_angles] = fan2para(...) returns the fan-beam sensor measurement angles in fan_positions, if 'FanSensorGeometry' is 'arc'. If 'FanSensorGeometry' is 'line', fan_positions contains the fan-beam sensor positions along the line of sensors. fan_rotation_angles contains rotation angles.

Class Support

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.

Examples

Generate parallel-beam projections

ph = phantom(128);
theta = 0:180;
[P,xp] = radon(ph,theta);
imshow(theta,xp,P,[],'n'), axis normal
title('Parallel-Beam Projections')
xlabel('\theta (degrees)')
ylabel('x''')
colormap(hot), colorbar

Convert to fan-beam projections

[F,Fpos,Fangles] = para2fan(P,100);  
figure, imshow(Fangles,Fpos,F,[],'n'), axis normal
title('Fan-Beam Projections')
xlabel('\theta (degrees)')
ylabel('Sensor Locations (degrees)')
colormap(hot), colorbar

See Also

| | | | |

Was this topic helpful?