Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2d sinogram #595

Open
rasad-hub opened this issue Oct 19, 2024 · 3 comments
Open

2d sinogram #595

rasad-hub opened this issue Oct 19, 2024 · 3 comments

Comments

@rasad-hub
Copy link

rasad-hub commented Oct 19, 2024

Hello, I need to reconstruct my sinogram matrix with dimensions 300x180. I used your 2D demo, but unfortunately, I’m encountering this error. Could you please guide me?"


geo.DSD = 1536;                             % Distance Source Detector      (mm)
geo.DSO = 1000;                             % Distance Source Origin        (mm)
% Detector parameters

%
% 1- Make the detector Nx1 
% 2- Make the image NxMx1 


% Image parameters
geo.nVoxel=[256;256;1];                   % number of voxels              (vx)
geo.sVoxel=[256;256;1];                   % total size of the image       (mm)
geo.dVoxel=geo.sVoxel./geo.nVoxel;          % size of each voxel            (mm)

geo.nDetector=[300;  180];					% number of pixels              (px)
geo.dDetector=[0.8; geo.dVoxel(3)]; 					% size of each pixel            (mm)
geo.sDetector=geo.nDetector.*geo.dDetector; % total size of the detector    (mm)

% MAKE SURE THAT THE DETECTOR PIXELS SIZE IN V IS THE SAME AS THE IMAGE!

% Offsets
geo.offOrigin =[0;0;0];                     % Offset of image from origin   (mm)              
geo.offDetector=[0; 0]; 


% Auxiliary 
geo.accuracy=0.5;                           % Accuracy of FWD proj          (vx/sample)
geo.mode='parallel';
%% Define angles of projection and load phantom image

angles=linspace(0,180,180);
proj = single(load('C:\Users\pc\Desktop\resolutionphantom.m'));       %180*300 matrix
projections = proj;

error
Index in position 3 exceeds array bounds. Index must not exceed 1.

Error in filtering (line 39)
fproj(round(filt_len/2-geo.nDetector(1)/2+1):round(filt_len/2+geo.nDetector(1)/2),:) = proj(:,:,ii);

Error in FBP (line 49)
proj_filt = filtering(proj,geo,angles,parker); % Not sure if offsets are good in here

Error in untitled9 (line 42)
imgf=FBP(projections,geo,angles);

@AnderBiguri
Copy link
Member

Have a look at the demo again. The size of proj has to be 3D, with one of the dimensions being of size 1.

@rasad-hub
Copy link
Author

Have a look at the demo again. The size of proj has to be 3D, with one of the dimensions being of size 1.

Do you mean that I can't reconstruct my two-dimensional sinogram matrix directly and I have to convert this two-dimensional sinogram into three dimensions with commands in MATLAB?

@AnderBiguri
Copy link
Member

@rasad-hub yes! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants