This is a static copy of a profile report

Home

bwboundaries>parseInputs (1721 calls, 0.381 sec)
Generated 05-Nov-2014 07:52:43 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/bwboundaries.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
bwboundariesfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
160
iptcheckinput(BW, {'numeric','...
17210.060 s15.8%
156
iptchecknargin(1,4,nargin,mfil...
17210.060 s15.8%
180
iptcheckinput(conn, {'double'}...
17210.050 s13.2%
181
if (conn~=4 && conn~=8...
17210.040 s10.5%
179
conn = varargin{2};
17210.030 s7.9%
All other lines  0.140 s36.8%
Totals  0.381 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
iptcheckinputMEX-file34420.040 s10.5%
iptchecknarginfunction17210.030 s7.9%
Self time (built-ins, overhead, etc.)  0.310 s81.6%
Totals  0.381 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function51
Non-code lines (comments, blank lines)12
Code lines (lines that can run)39
Code lines that did run17
Code lines that did not run22
Coverage (did run/can run)43.59 %
Function listing
   time   calls  line
154 function [BW, conn, findholes] = parseInputs(varargin)
155
0.06 1721 156 iptchecknargin(1,4,nargin,mfilename);
157
0.01 1721 158 BW = varargin{1};
159
0.06 1721 160 iptcheckinput(BW, {'numeric','logical'}, {'real','2d','nonsparse'}, ...
161 mfilename, 'BW', 1);
162
0.01 1721 163 if ~islogical(BW)
164 BW = BW ~= 0;
165 end
166
0.02 1721 167 firstStringToProcess = 0;
168
0.03 1721 169 if nargin < 2
170 conn = 8;
1721 171 else
0.01 1721 172 if ischar(varargin{2})
173 firstStringToProcess = 2;
174 conn = 8;
0.01 1721 175 else
0.01 1721 176 if nargin > 2,
177 firstStringToProcess = 3;
178 end
0.03 1721 179 conn = varargin{2};
0.05 1721 180 iptcheckinput(conn, {'double'}, {}, mfilename, 'CONN', 2);
0.04 1721 181 if (conn~=4 && conn~=8)
182 error(message('images:bwboundaries:badScalarConn'));
183 end
0.01 1721 184 end
1721 185 end
186
1721 187 findholes = true;
188
0.01 1721 189 if firstStringToProcess
190 validStrings = {'noholes', 'holes'};
191
192 for k = firstStringToProcess:nargin
193 % check for options
194 string = iptcheckstrs(varargin{k}, validStrings, mfilename, 'OPTION', k);
195 switch string
196 case 'noholes'
197 findholes = false;
198 case 'holes'
199 findholes = true;
200 otherwise
201 error(message('images:bwboundaries:unexpectedError'))
202 end
203 end
204 end

Other subfunctions in this file are not included in this listing.