-
Notifications
You must be signed in to change notification settings - Fork 2
/
picture_rotate.m
37 lines (26 loc) · 913 Bytes
/
picture_rotate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function picture_rotate
%% Function to rotate SEM image
% author: d.mercier@mpie.de
gui = guidata(gcf);
set(gui.figure.main_window, 'CurrentAxes', gui.axes);
if gui.flag.picture_load
zoom reset;
prompt = {'Enter ° of rotation:'};
dlg_title = 'Input';
num_lines = 1;
def = {'45'};
Rotation = inputdlg(prompt, dlg_title, num_lines, def);
Rotationvalue = str2double(cell2mat(Rotation));
if gui.picture.filenameimage_cropped == 1
gui.picture.filenameimage_rotated = ...
imrotate(gui.picture.filenameimage_cropped, Rotationvalue, ...
'loose', 'bilinear');
else
gui.picture.filenameimage_rotated = ...
imrotate(gui.picture.rawImages, Rotationvalue, ...
'loose', 'bilinear');
end
gui.picture.sem_image = imshow(gui.picture.filenameimage_rotated);
guidata(gcf, gui);
end
end