This is a static copy of a profile report

Home

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 NameFunction TypeCalls
imhistfunction404
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
34
range = double([intmin(classTy...
4040.090 s56.3%
30
iptcheckinput(I,{'numeric','lo...
4040.020 s12.5%
29
iptchecknargin(1,1,nargin,mfil...
4040.020 s12.5%
33
classType = class(I);
4040 s0%
32
if isinteger(I)
4040 s0%
All other lines  0.030 s18.7%
Totals  0.160 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
intminfunction4040.070 s43.8%
intmaxfunction4040.010 s6.2%
iptcheckinputMEX-file4040.010 s6.2%
iptchecknarginfunction4040.010 s6.2%
Self time (built-ins, overhead, etc.)  0.060 s37.5%
Totals  0.160 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function38
Non-code lines (comments, blank lines)30
Code lines (lines that can run)8
Code lines that did run5
Code lines that did not run3
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.