This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
images/private/strelcheckfunction1721
strel>MakeArbitraryStrelsubfunction1721
find_cell_codesfunction202
strel>MakeDiskStrelsubfunction1414
strel>MakePeriodicLineStrelsubfunction808
strel>MakeLineStrelsubfunction404
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
168
se = MakeDiskStrel(params{:});
2021.192 s26.8%
148
[type,params] = ParseInputs(va...
31350.831 s18.7%
162
se = MakeLineStrel(params{:});
4040.561 s12.6%
166
se = MakePeriodicLineStrel(par...
8080.401 s9.0%
178
se(j).Flat = ~any(se(j).height...
62700.280 s6.3%
All other lines  1.182 s26.6%
Totals  4.446 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>MakeDiskStrelsubfunction2021.192 s26.8%
strel>ParseInputssubfunction31350.781 s17.6%
strel>MakeLineStrelsubfunction4040.551 s12.4%
strel>MakePeriodicLineStrelsubfunction8080.360 s8.1%
strel>MakeArbitraryStrelsubfunction17210.190 s4.3%
Self time (built-ins, overhead, etc.)  1.372 s30.9%
Totals  4.446 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function55
Non-code lines (comments, blank lines)13
Code lines (lines that can run)42
Code lines that did run24
Code lines that did not run18
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.