diff --git a/Browsing Functions/AtlasTransformBrowser.m b/Browsing Functions/AtlasTransformBrowser.m index af86a1d..78cd002 100644 --- a/Browsing Functions/AtlasTransformBrowser.m +++ b/Browsing Functions/AtlasTransformBrowser.m @@ -779,8 +779,9 @@ function hotkeyFcn(f, slice_figure, keydata, allData, save_location, save_suffix disp('atlas location saved') % save transformed histology image - current_slice_image = imread(fullfile(save_location, [slice_name '.tif'])); -% current_slice_image = flip(get(ud_slice.im, 'CData'),1); + % current_slice_image = imread(fullfile(save_location, [slice_name '.tif']));%TODO no imreisze() used, size mismatch creates a huge error in transform + current_slice_image = flip(get(ud_slice.im, 'CData'),1); + R = imref2d(size(ud.ref)); curr_slice_trans = imwarp(current_slice_image, ud.transform, 'OutputView',R); imwrite(curr_slice_trans, fullfile(folder_transformations, [slice_name '_transformed.tif']))