This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
imclose | function | 6060 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
72 | strel_is_2d = ndims(getnhood(s... | 6060 | 0.511 s | 26.2% |  |
69 | strel_is_flat = isflat(se); | 6060 | 0.481 s | 24.6% |  |
64 | se = strelcheck(varargin{2}, m... | 6060 | 0.401 s | 20.5% |  |
58 | iptchecknargin(2,2,nargin,mfil... | 6060 | 0.140 s | 7.2% |  |
65 | if length(se(:)) > 1 | 6060 | 0.100 s | 5.1% |  |
All other lines | | | 0.320 s | 16.4% |  |
Totals | | | 1.953 s | 100% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 24 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 16 |
Code lines that did run | 12 |
Code lines that did not run | 4 |
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;