function slice5plots(absorb,m,n); %% slice5plots(absorb,m,n); %% %% Plots vector of absorbtion coefficents in 5 slices %% %% Inputs: absorb: vector of absorption coefficients %% m,n: number of x and y voxels in 3D volume %% %% Assumes length of absorption coefficient vector is 5mn %% %% Plots are scaled globally across everything in the absorb vector %% %% Could easily be generalized to handle a variable number of slices %% if someone is so inclined. %% %% DH Brooks, Mar 04 %% v 1.0 % find max and min for global scaling, then reshape vector to fit plotting scheme mmin = min(absorb); mmax = max(absorb); absorb = reshape(absorb,m,n,5); % cycle through the 5 plots % in each panel, plot the image for that slice, set the color axis and the % aspect ratio, plot the colorbar, and insert the title of that panel. subplot(3,2,1) imagesc(squeeze(absorb(:,:,1))) caxis([mmin,mmax]) axis('image') colorbar title('Top Slice') subplot(3,2,2) imagesc(squeeze(absorb(:,:,2))) caxis([mmin,mmax]) axis('image') colorbar title('2nd from Top Slice') subplot(3,2,3) imagesc(squeeze(absorb(:,:,3))) caxis([mmin,mmax]) axis('image') colorbar title('3rd from Top Slice') subplot(3,2,4) imagesc(squeeze(absorb(:,:,4))) caxis([mmin,mmax]) axis('image') colorbar title('4th from Top Slice') subplot(3,2,5) imagesc(squeeze(absorb(:,:,5))) caxis([mmin,mmax]) axis('image') colorbar title('Bottom Slice')