This is a static copy of a profile report

Home

iptgetpref (2 calls, 0.040 sec)
Generated 05-Nov-2014 07:53:12 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/iptutils/iptgetpref.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ipplfunction1
imreconstructfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
23
s = Settings;
20.030 s75.0%
47
preference = validatestring(pr...
20.010 s25.0%
81
end
20 s0%
79
end
20 s0%
66
value = s.images.UseIPPL;
20 s0%
All other lines  0 s0%
Totals  0.040 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
validatestringfunction20.010 s25.0%
iptutils/private/iptprefsinfofunction20 s0%
Self time (built-ins, overhead, etc.)  0.030 s75.0%
Totals  0.040 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function81
Non-code lines (comments, blank lines)42
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
1 function value = iptgetpref(prefName)
2 %IPTGETPREF Get value of Image Processing Toolbox preference.
3 % PREFS = IPTGETPREF without an input argument returns a structure
4 % containing all the Image Processing Toolbox preferences with their
5 % current values. Each field in the structure has the name of an Image
6 % Processing Toolbox preference. See IPTSETPREF for a list.
7 %
8 % VALUE = IPTGETPREF(PREFNAME) returns the value of the Image
9 % Processing Toolbox preference specified by the string PREFNAME. See
10 % IPTSETPREF for a complete list of valid preference names. Preference
11 % names are not case-sensitive and can be abbreviated.
12 %
13 % Example
14 % -------
15 % value = iptgetpref('ImshowAxesVisible')
16 %
17 % See also IMSHOW, IPTSETPREF.
18
19 % Copyright 1993-2011 The MathWorks, Inc.
20 % $Revision: 1.1.8.10 $ $Date: 2011/05/17 02:11:30 $
21
22 % migrate preferences to settings if necessary
0.03 2 23 s = Settings;
2 24 if ~s.images.PreferencesMigrated
25 migratePreferences();
26 end
27
2 28 error(nargchk(0,1,nargin,'struct'));
29
30 % Get IPT factory preference settings
2 31 factoryPrefs = iptprefsinfo;
2 32 allNames = factoryPrefs(:,1);
33
2 34 if nargin == 0
35 % Display all current preference settings
36 value = [];
37 for k = 1:length(allNames)
38 thisField = allNames{k}{1};
39 value.(thisField) = iptgetpref(thisField);
40 end
41
2 42 else
43 % Return specified preferences
2 44 validateattributes(prefName,{'char'},{},mfilename,'PREFNAME')
45
2 46 validPrefs = [allNames{:}];
0.01 2 47 preference = validatestring(prefName,validPrefs,mfilename,'PREFNAME');
48
49 % Handle the mixed-data-type magnification preferences first
2 50 if ~isempty(strfind(preference,'Magnification'))
51
52 % helper function sets both related settings appropriately
53 if strcmpi(preference,'ImshowInitialMagnification')
54 value = getInitialMag(s,'imshow');
55 else
56 value = getInitialMag(s,'imtool');
57 end
58
2 59 else
60
61 % Handle single-data-type preferences (each one individually)
2 62 if strcmpi(preference,'ImtoolStartWithOverview')
63 value = s.images.imtool.OpenOverview;
64
2 65 elseif strcmpi(preference,'UseIPPL')
2 66 value = s.images.UseIPPL;
67
68 elseif strcmpi(preference,'ImshowAxesVisible')
69 if s.images.imshow.ShowAxes
70 value = 'on';
71 else
72 value = 'off';
73 end
74
75 elseif strcmpi(preference,'ImshowBorder')
76 value = s.images.imshow.BorderStyle;
77
78 end
2 79 end
80
2 81 end

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