This is a static copy of a profile report

Home

imclose>ParseInputs (6060 calls, 1.953 sec)
Generated 05-Nov-2014 07:52:45 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/imclose.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imclosefunction6060
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
72
strel_is_2d = ndims(getnhood(s...
60600.511 s26.2%
69
strel_is_flat = isflat(se);
60600.481 s24.6%
64
se = strelcheck(varargin{2}, m...
60600.401 s20.5%
58
iptchecknargin(2,2,nargin,mfil...
60600.140 s7.2%
65
if length(se(:)) > 1
60600.100 s5.1%
All other lines  0.320 s16.4%
Totals  1.953 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.getnhoodsubfunction60600.371 s19.0%
strel>strel.isflatsubfunction60600.350 s17.9%
images/private/strelcheckfunction60600.300 s15.4%
iptchecknarginfunction60600.060 s3.1%
iptcheckinputMEX-file60600.020 s1.0%
Self time (built-ins, overhead, etc.)  0.851 s43.6%
Totals  1.953 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function24
Non-code lines (comments, blank lines)8
Code lines (lines that can run)16
Code lines that did run12
Code lines that did not run4
Coverage (did run/can run)75.00 %
Function listing
   time   calls  line
56 function [A,se,pre_pack] = ParseInputs(varargin)
57
0.14 6060 58 iptchecknargin(2,2,nargin,mfilename);
59
60 % Get the required inputs and check them for validity.
0.02 6060 61 A = varargin{1};
0.10 6060 62 iptcheckinput(A, {'numeric' 'logical'}, {'real' 'nonsparse'}, ...
63 mfilename, 'I or BW', 1);
0.40 6060 64 se = strelcheck(varargin{2}, mfilename, 'SE', 2);
0.10 6060 65 if length(se(:)) > 1
66 error(message('images:imclose:nonscalarStrel'));
67 end
68
0.48 6060 69 strel_is_flat = isflat(se);
0.01 6060 70 input_is_logical = islogical(A);
0.05 6060 71 input_is_2d = ndims(A) == 2;
0.51 6060 72 strel_is_2d = ndims(getnhood(se)) == 2;
0.01 6060 73 is_binary_op = input_is_logical;
74
0.01 6060 75 if input_is_logical && ~strel_is_flat
76 error(message('images:imclose:binaryImageWithNonflatStrel'));
77 end
78
0.05 6060 79 pre_pack = is_binary_op && input_is_2d && strel_is_2d;