CT Projection Simulator
Specifying an object as a shape results in fewer edge artifacts in the reconstructed image than with projections from radon.m, which specifies the object as an image.
A comparison of reconstructed images with CTProjSim and radon.m is given at
http://aprendtech.com/wordpress/?p=89
The object starts as empty and then shapes with specified dimensions and density can be added.
The projections are the product of the length through the instances of all shape times their density.
Different instances of each shape can have different density.
The density can be a vector quantity so the projections are a
(ndetectors, nangles, ndensity) matrix.
The shapes are specified by optional parameters of one or more pairs
'shape',spec where shape can be one of 'ellipse', 'gaussian', or 'polygon'
the spec parameter depends on the shape--see the function help
The lines are equally spaced around the origin and start parallel to the y-axis.
Here is an example of a Shepp-Logan phantom with a square in the middle
% projections for Shepp-Logan phantom
% the spec is for phantom in air .. not water
s = [ ...
0,0,0.92,0.69,90,2; ...
0,-0.0184,0.874,0.6624,90,-0.98; ...
0.22,0,0.31,0.11,72,-0.02; ...
-0.22,0,0.41,0.16,108,-0.02; ...
0,0.35,0.25,0.21,90,0.01; ...
0,0.1,0.046,0.046,0,0.01; ...
0,-0.1,0.046,0.046,0,0.01; ...
-0.08,-0.605,0.046,0.023,0,0.01; ...
0,-0.605,0.023,0.023,0,0.01; ...
0.06,-0.605,0.046,0.023,90,0.01; ...
];
% add a small square at the center
% polygon vertexes are specified as complex vectors: x + iy
% exp(1i*pi/4) rotates the square by 45 degrees
pgon.vertex = 0.1*exp(1i*linspace(0,2*pi,5))*exp(1i*pi/4);
pgon.density = -0.1;
pjn = CTProjSim(0.0025,240,'ellipse',s,'polygon',pgon);
img = CTrecon(pjn); % see http://aprendtech.com/wordpress/?p=74 for CTrecon code
% can also use iradon but it will be slow
% nangles = 240;
% angles = linspace(0,180,nangles+1);
% img = iradon(pjn,angles(1:end-1));
imshow(img,[0.8 1.2])
-------
for more information see
http://aprendtech.com/wordpress/?p=159
http://aprendtech.com/wordpress/?p=166
引用
Robert Alvarez (2025). CT Projection Simulator (https://www.mathworks.com/matlabcentral/fileexchange/32925-ct-projection-simulator), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- Sciences > Biological and Health Sciences > Biomedical Imaging >
- MATLAB > Mathematics > Computational Geometry > Elementary Polygons >
- Sciences > Physics > Medical Physics >
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!