This is a static copy of a profile reportHome
getrangefromclass (404 calls, 0.160 sec)
Generated 05-Nov-2014 07:52:42 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/iptutils/getrangefromclass.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
imhist | function | 404 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
34 | range = double([intmin(classTy... | 404 | 0.090 s | 56.3% |  |
30 | iptcheckinput(I,{'numeric','lo... | 404 | 0.020 s | 12.5% |  |
29 | iptchecknargin(1,1,nargin,mfil... | 404 | 0.020 s | 12.5% |  |
33 | classType = class(I); | 404 | 0 s | 0% |  |
32 | if isinteger(I) | 404 | 0 s | 0% |  |
All other lines | | | 0.030 s | 18.7% |  |
Totals | | | 0.160 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
intmin | function | 404 | 0.070 s | 43.8% |  |
intmax | function | 404 | 0.010 s | 6.2% |  |
iptcheckinput | MEX-file | 404 | 0.010 s | 6.2% |  |
iptchecknargin | function | 404 | 0.010 s | 6.2% |  |
Self time (built-ins, overhead, etc.) | | | 0.060 s | 37.5% |  |
Totals | | | 0.160 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 38 |
Non-code lines (comments, blank lines) | 30 |
Code lines (lines that can run) | 8 |
Code lines that did run | 5 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 62.50 % |
Function listing
time calls line
1 function range = getrangefromclass(I)
2 %GETRANGEFROMCLASS Get dynamic range of image based on its class.
3 % RANGE = GETRANGEFROMCLASS(I) returns the dynamic range of the
4 % image I, based on its class type.
5 %
6 % Class Support
7 % -------------
8 % I can be numeric or logical. RANGE is a two-element vector of doubles.
9 %
10 % Note
11 % ----
12 % For single and double data, GETRANGEFROMCLASS returns the range [0 1],
13 % to be consistent with the way double and single images are interpreted
14 % in MATLAB. For integer data, GETRANGEFROMCLASS returns the range of
15 % the class. For example, if the class is uint8, the dynamic range is
16 % [0 255].
17 %
18 % Example
19 % -------
20 % % Get the dynamic range of an int16 image.
21 % CT = dicomread('CT-MONO2-16-ankle.dcm');
22 % r = getrangefromclass(CT)
23 %
24 % See also INTMIN, INTMAX.
25
26 % Copyright 1993-2010 The MathWorks, Inc.
27 % $Revision: 1.1.8.3 $ $Date: 2010/06/07 16:32:39 $
28
0.02 404 29 iptchecknargin(1,1,nargin,mfilename);
0.02 404 30 iptcheckinput(I,{'numeric','logical','int64','uint64'}, {}, mfilename,'I',1);
31
404 32 if isinteger(I)
404 33 classType = class(I);
0.09 404 34 range = double([intmin(classType) intmax(classType)]);
35 else
36 %double, single, or logical
37 range = [0 1];
38 end
Other subfunctions in this file are not included in this listing.