This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
14 | sig = fread(fid, 4, 'uint8'); | 12977 | 2.403 s | 52.9% |  |
8 | fid = fopen(filename, 'r', 'ie... | 12977 | 0.941 s | 20.7% |  |
15 | fclose(fid); | 12977 | 0.481 s | 10.6% |  |
19 | if isequal(sig, [73; 73; 43; 0... | 12977 | 0.280 s | 6.2% |  |
26 | tf = isequal(sig, [73; 73; 42;... | 12977 | 0.130 s | 2.9% |  |
All other lines | | | 0.310 s | 6.8% |  |
Totals | | | 4.546 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
19 | Use || instead of | as the OR operator in (scalar) conditional statements. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 26 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 12 |
Code lines that did run | 6 |
Code lines that did not run | 6 |
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]);