Beyung Doo Jo, as I stated previously, OSCAR won't work without modification. Please contact me in private if you want me to help. However, you really shall figure it out by yourself, by just fitting the data into OSCAR data format.
BTW, the projection images created by this code need to be flipped left/right to be compatible with OSCAR.
One more note here:
The sinogram images calculated by the simulation might need to be flipped left/right before being used into reconstruction, for instance, using OSCaR. This of course depends on your CBCT reconstruction algorithm implementation.
Many people have questions about how to setup the phantom. Here are some examples:
% CBCT_simulation_demo.m
output_folder = 'c:\CBCT_output_folder'; % Set the output folder
% Loading 3D phantom
% Method 1, using the Shepp-Logan phantom
data3d = phantom3d(256); % data3d will be 256x256x256, assuming the pixel size is 1mmx1mmx1mm
xs = 1:256; % 1 mm pixel size
xs = xs-mean(xs); % Center at the [0,0,0]
ys = xs; % 1 mm pixel size
zs = xs; % 1 mm pixel size
compute_projections(xs,ys,zs,data3d,1,output_folder); % Compute the projections
% Method 2, using my own data
data3d = load('my_3d_data.mat'); % Load saved 3D matrix
dx = 1; dy = 1; dz = 1; % The pixel size, is 1mm x 1mm x 1mm, giving in mm, not cm
% Image pixel size should be modified according to the real physical pixel dimension
dim = size(data3d);
xs = ((1:dim(2))-1)*dx; % Set xs
xs = xs - mean(xs); % Center to x=0
ys = ((1:dim(1))-1)*dy; % Set ys
ys = ys - mean(ys); % Center to y = 0
zs = ((1:dim(3))-1)*dz; % Set zs
zs = zs - mean(zs); % Center to z = 0
compute_projections(xs,ys,zs,data3d,1,output_folder); % Compute the projections
Comment only