This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
ml_setimglnpixel2function226
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
41
img2(sub2ind(imgsize,pts(:,1),...
2260.040 s66.7%
39
pts(pts(:,2)<=0 | pts(:,2)&...
2260.010 s16.7%
32
img2=img;
2260.010 s16.7%
38
pts(pts(:,1)<=0 | pts(:,1)&...
2260 s0%
36
end
2260 s0%
All other lines  0 s0%
Totals  0.060 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
sub2indfunction2260.010 s16.7%
Self time (built-ins, overhead, etc.)  0.050 s83.3%
Totals  0.060 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function41
Non-code lines (comments, blank lines)33
Code lines (lines that can run)8
Code lines that did run8
Code lines that did not run0
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);