This is a static copy of a profile report

Home

imagesci/private/istif (12977 calls, 4.546 sec)
Generated 05-Nov-2014 07:52:35 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/private/istif.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imagesci/private/imftypefunction12977
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
sig = fread(fid, 4, 'uint8');
129772.403 s52.9%
8
fid = fopen(filename, 'r', 'ie...
129770.941 s20.7%
15
fclose(fid);
129770.481 s10.6%
19
if isequal(sig, [73; 73; 43; 0...
129770.280 s6.2%
26
tf = isequal(sig, [73; 73; 42;...
129770.130 s2.9%
All other lines  0.310 s6.8%
Totals  4.546 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
19Use || instead of | as the OR operator in (scalar) conditional statements.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)14
Code lines (lines that can run)12
Code lines that did run6
Code lines that did not run6
Coverage (did run/can run)50.00 %
Function listing
   time   calls  line
1 function tf = istif(filename)
2 %ISTIF Returns true for a TIF file.
3 % TF = ISTIF(FILENAME)
4
5 % Copyright 1984-2008 The MathWorks, Inc.
6 % $Revision: 1.1.6.3 $ $Date: 2007/09/18 02:16:26 $
7
0.94 12977 8 fid = fopen(filename, 'r', 'ieee-le');
0.05 12977 9 if (fid < 0)
10 tf = false;
11 return
12 end
13
2.40 12977 14 sig = fread(fid, 4, 'uint8');
0.48 12977 15 fclose(fid);
16
17 %
18 % Is it a BigTiff?
0.28 12977 19 if isequal(sig, [73; 73; 43; 0]) | isequal(sig, [77; 77; 0; 43])
20 tf = true;
21 return
22 end
23
24 %
25 % It's not BigTiff. Check if it is classic Tiff.
0.13 12977 26 tf = isequal(sig, [73; 73; 42; 0]) | isequal(sig, [77; 77; 0; 42]);