Replies: 3 comments 7 replies
-
As a quick workaround, you can delete The reason for the crash is that I use previously computed data if possible, but that doesn't take into account changes to the FOV size, only in the number of voxels. Note that this applies to implementation 1 only. |
Beta Was this translation helpful? Give feedback.
-
after your solution, the code runs without issue despite i am using implementation 4, thank you for your reply |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi all,
i hope you are doing well,
i have the issue of field of view, when i raise the FOV it doesn't work, or if the code run successfully, th image is the same,
this is my code details:
i used "CT2D_fanbeam_mainExample.m"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Binning
% The level of binning used for the raw data. For example binning of 2
% reduces the size of the projections by two from both dimensions (e.g.
% 2048x3072 becomes 1024x1536).
options.binning = 1;
%%% Number of detector pixels (row)
% The number of detector pixels in the detector panel (row
% direction)
% NOTE: if you use binning, this value has to use the final binned
% dimensions
% In the 2D case, this should be 1
options.nRowsD = 200;
%%% Number of detector pixels (column)
% The number of detector pixels in the detector panel (column
% direction)
% NOTE: if you use binning, this value has to use the final binned
% dimensions
options.nColsD = 1;
%%% Number of projections
% Total number of projections used
options.nProjections = 90;
%%% Projection angles (degree or radian)
% The angles corresponding to the projections
options.angles = -linspace(0, 356, options.nProjections);
%%% Detector pixel pitch/size (mm)
% The size of the detector/distance between adjacent detectors
% NOTE: if you use binning, this value has to use the final binned
% dimensions
options.dPitch = 0.7;
%%% Source to detector distance (mm)
% The orthogonal distance from the source to the detector panel
options.sourceToDetector = 900;
%%% Source to center of rotation distance (mm)
% The distance from the source to the center of rotation/object/origin
options.sourceToCRot = 316;
%%% Name of current datafile/examination
% This is used for naming purposes only
options.name = '2DCT_data';
%%% Show status messages
% These are e.g. time elapsed on various functions and what steps have been
% completed. It is recommended to keep this true.
options.verbose = 1;
%%% Transaxial FOV size (mm), this is the length of the x (horizontal) side
% of the FOV
options.FOVa_x = 350;
%%% Transaxial FOV size (mm), this is the length of the y (vertical) side
% of the FOv
options.FOVa_y = options.FOVa_x;
%%% Axial FOV (mm)
options.axial_fov = options.dPitch;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load the measurement sinogram
% If you use different resolution, be sure the modify the scanner
% properties accordingly
load('/home/hassan/Desktop/output/Data164.mat','m')
m(m < 0) = 1;
options.SinM = m;
options.SinM = single(options.SinM) ./ single(max(max(max(options.SinM(:)))));
options.SinM(options.SinM > 1) = single(1);
options.SinM(options.SinM == 0) = single(min(options.SinM(options.SinM > 0)));
m=options.SinM;
options.SinM = 1./exp(m);
m= options.SinM;
% This is required when the input data is already linearized
options.usingLinearizedData = true;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% IMAGE PROPERTIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Reconstructed image pixel size (X-direction)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Reconstructed image pixel size (X-direction)
options.Nx = 512;
%%% Y-direction
options.Ny = 512;
%%% Z-direction (number of slices) (axial)
options.Nz = 1;
could you please help me to resolve this issue?
i tried to use this relation to raise the FOV: FOV=Pixel Size×Matrix Size
, but the code doesn't run and in the end matlab exit.
the ct slice obtained for FOV of 140.1 mm attached below
thank you very much
best regards
Beta Was this translation helpful? Give feedback.
All reactions