Prev: HDL code generation
Next: Excel read in
From: Srinivasarao Sakamuri on 14 May 2010 05:34 Hi Stanley , Here is the code to reconstruct 3D image from sinogram. SPECT = data.sinogram; filter = 'Ram-Lak';interpol = 'linear'; figure, imagesc(SPECT);color(hot) theta = 0 : 1 :179 ; del_sinogram = SPECT(:, theta+1); rec_img = iradon(del_sinogram,theta,filter, interpol); figure, imagesc(rec_img), colormap(pink); Here data representing the structure variable. I think it will help full to you. "Stanley " <smsearcy(a)ufl.edu> wrote in message <hp83r1$dbg$1(a)fred.mathworks.com>... > Good morning, > > I learning how to reconstruct SPECt images and need some help. > > Here’s what I have: > > A 128x64 array, 120 angles (slices), 2 byte integer > > To open the projection file into a 2-D array I used the following commands: > > fid=fopen(‘imageA.prj’); > B=fread(fid,[128,64], ‘uint16’); > > theta = linspace(270, -90, 120) This gives me 120 different projection angles > > theta will be used with iradon > > #1 I want to reshape imageA so that I have a 3-D matrix (x, y, projection angle) > > • I’ve tried the reshape command without success and really don’t know how to proceed > > #2 I also want to create a sinogram from the projection data > > • To reduce noise I was provided with the following code that sum to sum the 6 through 21 transaxial slices of the projection data: > > sino_sum(1:ndim, 1:nang)=0.; > for k=1:nang > for i=1:ndim > for j=6:21 > sino_sum(I,k)=sino_sum(I,k) +B(i, j, k) > end > end > end > > Can you help me convert the projection data from a 2D array into a 3D array? > Can you show me how to make a sinogram? – do I use iradon? > I believe nang is the number of projection angles (i.e., 120) > I’m not sure about the value for ndim > > Thank you in advance. > > Stanley
From: Srinivasarao Sakamuri on 14 May 2010 06:38 Here is the code. To make Sinogram you need radon function as follows... theta = 0:180; [R,xp] = radon(rec_img,theta); % rec_img is the input image. imshow(R,[],'Xdata',theta,'Ydata',xp,... 'InitialMagnification','fit') xlabel('\theta (degrees)') ylabel('x''') colormap(hot); You will get sinogram. To construct 3D image from sinogram you need iradon function as follows. SPECT = data.sinogram; filter = 'Ram-Lak';interpol = 'linear'; figure, imagesc(SPECT);color(hot) theta = 0 : 1 :179 ; del_sinogram = SPECT(:, theta+1); rec_img = iradon(del_sinogram,theta,filter, interpol); figure, imagesc(rec_img), colormap(pink); > Here data representing the structure variable. > I think it will help full to you. > > "Stanley " <smsearcy(a)ufl.edu> wrote in message <hp83r1$dbg$1(a)fred.mathworks.com>... > > Good morning, > > > > I learning how to reconstruct SPECt images and need some help. > > > > Here’s what I have: > > > > A 128x64 array, 120 angles (slices), 2 byte integer > > > > To open the projection file into a 2-D array I used the following commands: > > > > fid=fopen(‘imageA.prj’); > > B=fread(fid,[128,64], ‘uint16’); > > > > theta = linspace(270, -90, 120) This gives me 120 different projection angles > > > > theta will be used with iradon > > > > #1 I want to reshape imageA so that I have a 3-D matrix (x, y, projection angle) > > > > • I’ve tried the reshape command without success and really don’t know how to proceed > > > > #2 I also want to create a sinogram from the projection data > > > > • To reduce noise I was provided with the following code that sum to sum the 6 through 21 transaxial slices of the projection data: > > > > sino_sum(1:ndim, 1:nang)=0.; > > for k=1:nang > > for i=1:ndim > > for j=6:21 > > sino_sum(I,k)=sino_sum(I,k) +B(i, j, k) > > end > > end > > end > > > > Can you help me convert the projection data from a 2D array into a 3D array? > > Can you show me how to make a sinogram? – do I use iradon? > > I believe nang is the number of projection angles (i.e., 120) > > I’m not sure about the value for ndim > > > > Thank you in advance. > > > > Stanley
|
Pages: 1 Prev: HDL code generation Next: Excel read in |