This is a static copy of a profile report

Home

images/private/strelcheck (20305 calls, 1.943 sec)
Generated 05-Nov-2014 07:53:18 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/private/strelcheck.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
images/private/morphop>ParseInputssubfunction14245
imclose>ParseInputssubfunction6060
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
27
se = strel(in);
17211.071 s55.2%
10
if isa(in, 'strel')
203050.320 s16.5%
11
se = in;
185840.170 s8.8%
22
bad_elements = (in ~= 0) &...
17210.030 s1.5%
20
in = double(in);
17210.010 s0.5%
All other lines  0.340 s17.5%
Totals  1.943 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.strelsubfunction17211.011 s52.1%
Self time (built-ins, overhead, etc.)  0.931 s47.9%
Totals  1.943 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function29
Non-code lines (comments, blank lines)10
Code lines (lines that can run)19
Code lines that did run14
Code lines that did not run5
Coverage (did run/can run)73.68 %
Function listing
   time   calls  line
1 function se = strelcheck(in,func_name,arg_name,arg_position)
2 %STRELCHECK Check validity of STREL object, or convert neighborhood to STREL.
3 % SE = STREL(IN) returns IN if it is already a STREL; otherwise it
4 % assumes IN is a neighborhood-style array and tries to convert it to a
5 % STREL.
6
7 % Copyright 1993-2010 The MathWorks, Inc.
8 % $Revision: 1.6.4.6.2.1 $ $Date: 2011/07/18 00:35:46 $
9
0.32 20305 10 if isa(in, 'strel')
0.17 18584 11 se = in;
1721 12 else
0.01 1721 13 if ~( isnumeric(in) || islogical(in) )
14 error(message('images:strelcheck:invalidStrelType', func_name, iptnum2ordinal( arg_position ), arg_name))
15
0.01 1721 16 else
0.01 1721 17 if issparse(in)
18 in = full(in);
19 end
0.01 1721 20 in = double(in);
1721 21 if ~isempty(in)
0.03 1721 22 bad_elements = (in ~= 0) & (in ~= 1);
1721 23 if any(bad_elements(:))
24 error(message('images:strelcheck:invalidStrelValues', arg_name, iptnum2ordinal( arg_position ), func_name))
25 end
1721 26 end
1.07 1721 27 se = strel(in);
1721 28 end
1721 29 end