-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStack2grey.m
More file actions
30 lines (25 loc) · 942 Bytes
/
Copy pathStack2grey.m
File metadata and controls
30 lines (25 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
imageList = dir('*.tif') ;
[m,n] = size(imageList);
currentDirectory = pwd;
directoryString = 'CFHires005grey_slices';
mkdir(directoryString)
for i = 1:m
currentIm = imread(imageList(i).name);
currentIm = rgb2gray(currentIm);
imwrite(currentIm, [pwd,'\',directoryString, '\CFHires005grey_', num2str(i,'%04i'),'.tif'],'tif')
end
% Create Sinogram Figures
[Rr, xpr] = radon(rRecondImage, Dtheta);
[Rg, xpg] = radon(gRecondImage, Dtheta);
[Rb, xpb] = radon(bRecondImage, Dtheta);
figure, imagesc(Dtheta,xpr,Rr); colormap(hot); colorbar(); caxis([-120000 80000])
xlabel('\theta'); ylabel('x\prime');
title('Red Sinogram')
figure, imagesc(Dtheta,xpg,Rg); colormap(hot); colorbar; caxis([-120000 80000])
xlabel('\theta'); ylabel('x\prime');
title('Green Sinogram')
figure, imagesc(Dtheta,xpb,Rb); colormap(hot); colorbar; caxis([-120000 80000])
xlabel('\theta'); ylabel('x\prime');
title('Blue Sinogram')
figure
imshow(recondImage)