This is a static copy of a profile reportHome
strel>strel.strel (6270 calls, 4.446 sec)
Generated 05-Nov-2014 07:53:17 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/strel.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 |
168 | se = MakeDiskStrel(params{:}); | 202 | 1.192 s | 26.8% |  |
148 | [type,params] = ParseInputs(va... | 3135 | 0.831 s | 18.7% |  |
162 | se = MakeLineStrel(params{:}); | 404 | 0.561 s | 12.6% |  |
166 | se = MakePeriodicLineStrel(par... | 808 | 0.401 s | 9.0% |  |
178 | se(j).Flat = ~any(se(j).height... | 6270 | 0.280 s | 6.3% |  |
All other lines | | | 1.182 s | 26.6% |  |
Totals | | | 4.446 s | 100% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 55 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 42 |
Code lines that did run | 24 |
Code lines that did not run | 18 |
Coverage (did run/can run) | 57.14 % |
Function listing
time calls line
0.22 6270 127 function se = strel(varargin)
128
0.07 6270 129 if (nargin == 0)
130 % No input arguments --- return empty strel
131
0.06 3135 132 elseif (nargin == 1) && ...
133 (isa(varargin{1}, 'strel') || isa(varargin{1}, 'struct'))
134
135 % One strel or struct input --- copy constructor
136 % automatically update version by using default
137 se1 = varargin{1};
138
139 se = repmat(strel, [1 numel(se1)]);
140 for j = 1:numel(se1);
141 se(j) = strel;
142 se(j).nhood = se1(j).nhood;
143 se(j).height = se1(j).height;
144 se(j).decomposition = se1(j).decomposition;
145 end
146
0.01 3135 147 else
0.83 3135 148 [type,params] = ParseInputs(varargin{:});
149
3135 150 switch type
3135 151 case 'arbitrary'
0.22 1721 152 se = MakeArbitraryStrel(params{:});
0.01 1414 153 case 'square'
154 se = MakeSquareStrel(params{:});
0.02 1414 155 case 'diamond'
156 se = MakeDiamondStrel(params{:});
0.02 1414 157 case 'rectangle'
158 se = MakeRectangleStrel(params{:});
0.01 1414 159 case 'octagon'
160 se = MakeOctagonStrel(params{:});
1414 161 case 'line'
0.56 404 162 se = MakeLineStrel(params{:});
0.02 1010 163 case 'pair'
164 se = MakePairStrel(params{:});
1010 165 case 'periodicline'
0.40 808 166 se = MakePeriodicLineStrel(params{:});
202 167 case 'disk'
1.19 202 168 se = MakeDiskStrel(params{:});
169 case 'ball'
170 se = MakeBallStrel(params{:});
171 otherwise
172 error(message('images:strel:unknownStrelType'));
173 end
0.02 3135 174 end
175
176 % precompute Flat
0.28 6270 177 for j = 1:numel(se)
0.28 6270 178 se(j).Flat = ~any(se(j).height(:)); %#ok<AGROW>
0.07 6270 179 end
180
0.04 6270 181 end
Other subfunctions in this file are not included in this listing.