close all
U_o = imread('wook_L20_G20.bmp');
U_o = double(U_o(:,:,1))/255;  % U_o (ox, oy) ~ not image size

U_o1D=zeros(length(U_o),1);
U_o1D=transpose(U_o(1,:));
index_z2=1;

for z2 = z2_under_image + z2_image : z2_series_step : z2_upper_image + z2_image
    
    
    final_image(:,index_z2)=conv(abs(final_h(:,index_z2)),U_o1D,'same');
    
    
    index_z2;
    index_z2=index_z2+1;
    
    
end

%final image should be normalized too

% for as = 1:601
%     final_image(:,as)=final_image(:,as)/sum(final_image(:,as));
% end


slice=zeros(grid_size,601);
slice=final_image;
imagesc(abs(slice));
colormap(gray)

%% range of 70um
channel_height=35;%채널 높이에 따라 이부분 바뀜
cropped_width=200;
figure;
slice_height=zeros(cropped_width,channel_height);
slice_height=final_image(uint16((grid_size-cropped_width)/2):uint16((grid_size+cropped_width)/2),302-channel_height:301);
imagesc(abs(slice_height));
axis image;
colormap(gray);
figure;lol=imrotate(slice_height,90);
imagesc(lol);
axis image;
set(gca,'XTick',[]);
set(gca,'YTick',[10;20;30],'FontSize',20);
%ylabel('(\mu\itm)','rot',90,'FontSize',12);
set(get(gca,'YLabel'),'Rotation',0.0)