%%%%% main.m %%%%%%%
% V 是一个三维数组
hfig = figure;
for slice=200:1:280A=squeeze(V(:,slice,:));
MyMouseMotion(A,slice,hfig);
disp(['Next Figure! No. ',num2str(slice+1)]);
end
%%%%% MyMouseMotion.m %%%%%%%%
function MyMouseMotion(A,slice,hfig)
ah = axes('DrawMode','fast');
imagesc(A); colormap gray;
caxis([0,200]);
% set(hfig, 'position', get(0,'ScreenSize')); %Full Screen
% axis ([20 220 20 220]) % Set axis range
title(num2str(slice));
X=[];
Y=[];
Area=[];
flag=1;
set(hfig,'WindowButtonDownFcn',@wbdcb); %callback func when mouse is clicked
while flag==1 % Waiting for the right cl