This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
8 | img = img(:,:,find(nnzpixel,1)... | 202 | 0.421 s | 44.2% |  |
5 | nnzpixel = squeeze(sum(sum(img... | 202 | 0.220 s | 23.2% |  |
4 | imgbw = img > 0; | 202 | 0.210 s | 22.1% |  |
17 | img2 = img(T:B,L:R,:); | 202 | 0.030 s | 3.2% |  |
13 | csum = sum(supshape,2); | 202 | 0.020 s | 2.1% |  |
All other lines | | | 0.050 s | 5.3% |  |
Totals | | | 0.951 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
squeeze | function | 202 | 0.040 s | 4.2% |  |
Self time (built-ins, overhead, etc.) | | | 0.911 s | 95.8% |  |
Totals | | | 0.951 s | 100% | |
Code Analyzer results
Line number | Message |
6 | The value assigned here to 'maxfluo' appears to be unused. Consider replacing it by ~. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 18 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 13 |
Code lines that did run | 13 |
Code lines that did not run | 0 |
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];