This is a static copy of a profile reportHome
ml_setimgptspixel (226 calls, 0.060 sec)
Generated 05-Nov-2014 07:52:53 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/2D/tztoolbox/ml_setimgptspixel.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 |
41 | img2(sub2ind(imgsize,pts(:,1),... | 226 | 0.040 s | 66.7% |  |
39 | pts(pts(:,2)<=0 | pts(:,2)&... | 226 | 0.010 s | 16.7% |  |
32 | img2=img; | 226 | 0.010 s | 16.7% |  |
38 | pts(pts(:,1)<=0 | pts(:,1)&... | 226 | 0 s | 0% |  |
36 | end | 226 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.060 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
sub2ind | function | 226 | 0.010 s | 16.7% |  |
Self time (built-ins, overhead, etc.) | | | 0.050 s | 83.3% |  |
Totals | | | 0.060 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 41 |
Non-code lines (comments, blank lines) | 33 |
Code lines (lines that can run) | 8 |
Code lines that did run | 8 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function img2=ml_setimgptspixel(img,pts)
2
3 %ML_SETIMGPTSPIXEL sets values for specified pixels
4 % IMG2=ML_SETIMGPTSPIXEL(IMG,PTS) change values of
5 % pixels in IMG. The positions of changed pixels
6 % are defined by the first two columns of pts, for row
7 % and colomn indices. The third column contain pixel values
8 % of it exists. If PTS only has two columns, the pixels
9 % are set to 1.
10
11 % Copyright (C) 2006 Murphy Lab
12 % Carnegie Mellon University
13 %
14 % This program is free software; you can redistribute it and/or modify
15 % it under the terms of the GNU General Public License as published
16 % by the Free Software Foundation; either version 2 of the License,
17 % or (at your option) any later version.
18 %
19 % This program is distributed in the hope that it will be useful, but
20 % WITHOUT ANY WARRANTY; without even the implied warranty of
21 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 % General Public License for more details.
23 %
24 % You should have received a copy of the GNU General Public License
25 % along with this program; if not, write to the Free Software
26 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 % 02110-1301, USA.
28 %
29 % For additional information visit http://murphylab.web.cmu.edu or
30 % send email to murphy@cmu.edu
31
0.01 226 32 img2=img;
226 33 imgsize=size(img);
226 34 if size(pts,2)<3
226 35 pts(:,3)=1;
226 36 end
37
226 38 pts(pts(:,1)<=0 | pts(:,1)>imgsize(1),:)=[];
0.01 226 39 pts(pts(:,2)<=0 | pts(:,2)>imgsize(2),:)=[];
40
0.04 226 41 img2(sub2ind(imgsize,pts(:,1),pts(:,2)))=pts(:,3);