Switch to unified view

a b/combinedDeepLearningActiveContour/functions/ImageClipping.m
1
function D_clipped = ImageClipping(D,zRange,max_res) 
2
iz = floor(mean (zRange)) ; % sample image
3
I = squeeze(D(:,:,iz)) ; 
4
5
disp('Next: clipping the image'); 
6
imshow(I,[0,max_res]); 
7
str = sprintf('MRI No.= %f',iz); % str = sprintf('Plot with frequency = %f , and wavelength = %f',number,number2);
8
title(str);
9
waitfor(msgbox(' please locate top left point'))
10
LT_point =  ginput(1); % left top
11
LT_point = floor(LT_point) ; 
12
waitfor(msgbox('located bottom right point')); 
13
RB_point = ginput(1);
14
RB_point = floor(RB_point) ; 
15
%I = I(LT_point(2): RB_point(2), LT_point(1): RB_point(1));
16
D_clipped = D(LT_point(2): RB_point(2), LT_point(1): RB_point(1),zRange);