% load('/Users/kylyi/Documents/MATLAB/Bakalarka/Bc/pat_17_0/Th10/vert_17_an.mat');

% vert = mask_vert;

image = contours;
figure

i = 1;
j = 1;
while i == 1
    imshow(image(:,:,j));
    waitforbuttonpress;
    k = get(gcf,'CurrentCharacter');
    
    switch(k)
        case 'q'
            i = 0;
            close all;
        case 'l'
            j = j + 1;
        case 'k'
            j = j - 1;
    end
    
    if j > size(image,3)
        j = 1;
    elseif j < 1
        j = size(image,3);
    end 
    j
end