%% Zoom for skel manuscript figure
clear
clc

%% GBA-Mut
%Ims_MUT = {'Y:\16-Our Papers\In Preparation\LRRK2 astrocytes _ Silvia\Figures\Second Version\Figure_7\Originals\Panel_D_Representative_Pics\SB_60x_TMRM_Astro_20210713-D3-KI_20210716_153120\CompositeF01.png',...
%          'Y:\16-Our Papers\In Preparation\LRRK2 astrocytes _ Silvia\Figures\Second Version\Figure_7\Originals\Panel_D_Representative_Pics\SB_60x_TMRM_Astro_20210713-D3-KI_20210716_153120\F01_021_Skeleton.png'};
      
Ims_MUT = {'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\PD2\PD2_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+3+4.tif',...
            'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\PD2\PD2_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+3.tif',...
          'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\PD2\PD2_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+4.tif'};
for i = 1:3
    Im = imread(Ims_MUT{i});
    %imtool(Im)
    %ImCropped = Im(1:1800, 1000:2000, :);
    ImCropped = Im(:, :, :);
    %imtool(ImCropped)
    imSize = [size(ImCropped, 1), size(ImCropped, 2)];
    %[BarMask, BarCenter] = f_barMask(20, 0.1, imSize, imSize(1)-30, 20, 10);
    %it(BarMask)
    %ImOutput = imoverlay(ImCropped, BarMask, [1 1 1]);
    %Image, topleft_x, bottomleft_y, width, hight, zoomfactor, linewidth
    %ImOutput = f_ZoomBoxRGB(ImCropped, 550, 1450, 120, 120, 3, 1);
    ImOutput = f_ZoomBoxRGB(ImCropped, 135, 170, 45, 45, 2.5, 1);
    imtool(ImOutput)
end

%% WT healthy
Ims_wt = {
    'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\CTRL1\CTRL1_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+3.tif',...
    'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\CTRL1\CTRL1_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+3+4.tif',...
      'D:\16-Our Papers\In Preparation\GBA hMO_Isabel\Figures\Fig1\Partials\D\CTRL1\CTRL1_E42D30_R2_488LAMP1_568GBA_cropped_z3c1+4.tif'};
for i = 1:3
    Im = imread(Ims_wt{i});
    %imtool(Im)
    %ImCropped = Im(1:1800, 1000:2000, :);
    ImCropped = Im(:, :, :);
    %imtool(ImCropped)
    imSize = [size(ImCropped, 1), size(ImCropped, 2)];
    %[BarMask, BarCenter] = f_barMask(20, 0.1, imSize, imSize(1)-30, 20, 10);
    %it(BarMask)
    %ImOutput = imoverlay(ImCropped, BarMask, [1 1 1]);
    %Image, topleft_x, bottomleft_y, width, hight, zoomfactor, linewidth
    %ImOutput = f_ZoomBoxRGB(ImCropped, 550, 1450, 120, 120, 3, 1);
    ImOutput = f_ZoomBoxRGB(ImCropped, 240, 270, 45, 45, 2.5, 1);
    %ImOutput = f_ZoomBoxRGB(ImCropped, 75, 110,45, 45, 2.5, 0.99999);
    imtool(ImOutput)
end
