This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
27 | se = strel(in); | 1721 | 1.071 s | 55.2% |  |
10 | if isa(in, 'strel') | 20305 | 0.320 s | 16.5% |  |
11 | se = in; | 18584 | 0.170 s | 8.8% |  |
22 | bad_elements = (in ~= 0) &... | 1721 | 0.030 s | 1.5% |  |
20 | in = double(in); | 1721 | 0.010 s | 0.5% |  |
All other lines | | | 0.340 s | 17.5% |  |
Totals | | | 1.943 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
strel>strel.strel | subfunction | 1721 | 1.011 s | 52.1% |  |
Self time (built-ins, overhead, etc.) | | | 0.931 s | 47.9% |  |
Totals | | | 1.943 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 29 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 19 |
Code lines that did run | 14 |
Code lines that did not run | 5 |
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