This is a static copy of a profile report

Home

tp_imtight (202 calls, 0.951 sec)
Generated 05-Nov-2014 07:52:41 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/3D/tp_imtight.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tp_nucimgfeatfunction202
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
8
img = img(:,:,find(nnzpixel,1)...
2020.421 s44.2%
5
nnzpixel = squeeze(sum(sum(img...
2020.220 s23.2%
4
imgbw = img > 0;
2020.210 s22.1%
17
img2 = img(T:B,L:R,:);
2020.030 s3.2%
13
csum = sum(supshape,2);
2020.020 s2.1%
All other lines  0.050 s5.3%
Totals  0.951 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
squeezefunction2020.040 s4.2%
Self time (built-ins, overhead, etc.)  0.911 s95.8%
Totals  0.951 s100% 
Code Analyzer results
Line numberMessage
6The value assigned here to 'maxfluo' appears to be unused. Consider replacing it by ~.
Coverage results
[ Show coverage for parent directory ]
Total lines in function18
Non-code lines (comments, blank lines)5
Code lines (lines that can run)13
Code lines that did run13
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [img2,bound] = tp_imtight(img)
2 % IMG2 = TP_IMTIGHT removes extra blank boundary of a 3D image
3
0.21 202 4 imgbw = img > 0;
0.22 202 5 nnzpixel = squeeze(sum(sum(imgbw)));
0.01 202 6 [maxfluo,supid] = max(nnzpixel);
0.01 202 7 supshape = imgbw(:,:,supid);
0.42 202 8 img = img(:,:,find(nnzpixel,1):find(nnzpixel,1,'last'));
9
0.02 202 10 rsum = sum(supshape,1);
202 11 L = find(rsum,1);
202 12 R = find(rsum,1,'last');
0.02 202 13 csum = sum(supshape,2);
202 14 T = find(csum,1);
0.01 202 15 B = find(csum,1,'last');
16
0.03 202 17 img2 = img(T:B,L:R,:);
202 18 bound = [T-1,B+1,L-1,R+1];