This is a static copy of a profile reportHome
tp_surfmap (202 calls, 10.344 sec)
Generated 05-Nov-2014 07:52:38 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/3D/tp_surfmap.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 |
17 | bounds = bwboundaries(imgk,8); | 1721 | 8.241 s | 79.7% |  |
24 | R(k,:) = interp1([theta-2*pi;t... | 1721 | 1.522 s | 14.7% |  |
23 | [theta,uidx] = unique(theta); | 1721 | 0.411 s | 4.0% |  |
22 | [theta,rho] = cart2pol(boundX,... | 1721 | 0.060 s | 0.6% |  |
19 | boundX = bound(:,1) - ctrX; | 1721 | 0.040 s | 0.4% |  |
All other lines | | | 0.070 s | 0.7% |  |
Totals | | | 10.344 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
bwboundaries | function | 1721 | 8.201 s | 79.3% |  |
interp1 | function | 1721 | 1.112 s | 10.7% |  |
unique | function | 1721 | 0.391 s | 3.8% |  |
repmat | function | 1721 | 0.240 s | 2.3% |  |
cart2pol | function | 1721 | 0.040 s | 0.4% |  |
Self time (built-ins, overhead, etc.) | | | 0.360 s | 3.5% |  |
Totals | | | 10.344 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 28 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 18 |
Code lines that did run | 18 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function map = tp_surfmap(img,delta)
2 % TP_SURFMAP convert a 3D surface into a 2D map using Cartesian-Cylindrical
3 % coordinate transformation. DELTA is the resampling step size of theta
4
202 5 img = img > 0;
202 6 [H,W,S] = size(img);
202 7 ctrX = H/2;
202 8 ctrY = W/2;
9
202 10 Phi = -pi:delta:pi;
0.01 202 11 N = length(Phi);
202 12 R = zeros(S,N);
13
202 14 for k = 1:S
1721 15 imgk = img(:,:,k);
16 % Dectect boundary
8.24 1721 17 bounds = bwboundaries(imgk,8);
0.02 1721 18 bound = bounds{1};
0.04 1721 19 boundX = bound(:,1) - ctrX;
1721 20 boundY = bound(:,2) - ctrY;
21 % Resampling
0.06 1721 22 [theta,rho] = cart2pol(boundX,boundY);
0.41 1721 23 [theta,uidx] = unique(theta);
1.52 1721 24 R(k,:) = interp1([theta-2*pi;theta;theta+2*pi],...
25 repmat(rho(uidx),[3,1]),Phi);
0.01 1721 26 end
27
202 28 map = R;