This is a static copy of a profile report

Home

iptcheckconn (34137 calls, 2.804 sec)
Generated 05-Nov-2014 07:52:46 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/iptutils/iptcheckconn.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
bwlabeln>parse_inputssubfunction404
imclearborder>parse_inputssubfunction1721
imreconstruct>ParseInputssubfunction13839
bwperimfunction18173
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
36
iptcheckinput(conn,{'double' '...
341370.701 s25.0%
39
if all(size(conn) == 1)
341370.641 s22.9%
50
if any((conn(:) ~= 1) & (c...
138390.210 s7.5%
58
if ~isequal(conn(1:end), conn(...
138390.160 s5.7%
46
if any(size(conn) ~= 3)
138390.130 s4.6%
All other lines  0.961 s34.3%
Totals  2.804 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
iptcheckinputMEX-file341370.210 s7.5%
Self time (built-ins, overhead, etc.)  2.594 s92.5%
Totals  2.804 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function61
Non-code lines (comments, blank lines)42
Code lines (lines that can run)19
Code lines that did run9
Code lines that did not run10
Coverage (did run/can run)47.37 %
Function listing
   time   calls  line
1 function iptcheckconn(conn,function_name,variable_name,arg_position)
2 %IPTCHECKCONN Check validity of connectivity argument.
3 % IPTCHECKCONN(CONN,FUNC_NAME,VAR_NAME,ARG_POS) checks if CONN
4 % is a valid connectivity argument. If it is invalid, the function
5 % issues a formatted error message.
6 %
7 % A connectivity argument can be one of the following scalar
8 % values, 1, 4, 6, 8, 18, or 26. A connectivity argument can also
9 % be a 3-by-3-by- ... -by-3 array of 0s and 1s. The central element
10 % of a connectivity array must be nonzero and the array must be
11 % symmetric about its center.
12 %
13 % FUNC_NAME is a string that specifies the name used in the formatted
14 % error message to identify the function checking the connectivity
15 % argument.
16 %
17 % VAR_NAME is a string that specifies the name used in the formatted
18 % error message to identify the argument being checked.
19 %
20 % ARG_POS is a positive integer that indicates the position of
21 % the argument being checked in the function argument list.
22 % IPTCHECKCONN includes this information in the formatted error message.
23 %
24 % Class Support
25 % -------------
26 % CONN must be of class double or logical and must be real and nonsparse.
27 %
28 % Example
29 % -------
30 % % Create a 4-by-4 array and pass it as connectivity argument.
31 % iptcheckconn(eye(4), 'func_name','var_name',2) 0000
32
33 % Copyright 1993-2011 The MathWorks, Inc.
34 % $Revision: 1.1.8.4.2.1 $ $Date: 2011/07/18 00:39:19 $
35
0.70 34137 36 iptcheckinput(conn,{'double' 'logical'},{'real' 'nonsparse'},...
37 function_name,variable_name,arg_position);
38
0.64 34137 39 if all(size(conn) == 1)
0.10 20298 40 if (conn ~= 1) && (conn ~= 4) && (conn ~= 8) && (conn ~= 6) && ...
41 (conn ~= 18) && (conn ~= 26)
42
43 compose_error('images:validate:badScalarConn',function_name,arg_position,variable_name)
44 end
0.09 13839 45 else
0.13 13839 46 if any(size(conn) ~= 3)
47 compose_error('images:validate:badConnSize',function_name,arg_position,variable_name)
48 end
49
0.21 13839 50 if any((conn(:) ~= 1) & (conn(:) ~= 0))
51 compose_error('images:validate:badConnValue',function_name,arg_position,variable_name)
52 end
53
0.02 13839 54 if conn((end+1)/2) == 0
55 compose_error('images:validate:badConnCenter',function_name,arg_position,variable_name)
56 end
57
0.16 13839 58 if ~isequal(conn(1:end), conn(end:-1:1))
59 compose_error('images:validate:nonsymmetricConn',function_name,arg_position,variable_name)
60 end
0.12 13839 61 end

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