function SaveData()

h=gcf;
ds=get(h,'UserData');

eval(['save ',ds.imgPath,ds.matFile,' ds']);

ds=get(h,'UserData');
minv=min(ds.im(:));
ds.im=ds.im-minv;
maxv=max(ds.im(:));
sp=1-maxv;
mv=-sp*0.7;
ds.im=ds.im-mv;

im2=ds.oim-ds.im;
minv=min(im2(:));
im2=im2-minv;
maxv=max(im2(:));

sp=1-maxv;
if (sp>0)
mv=-sp*0.7;
im2=im2-mv;
end
imwrite(ds.im-mv,[ds.imgPath,ds.L1File])

imwrite(im2,[ds.imgPath,ds.L2File])
