MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getRational

Method getRational

ij/src/main/java/ij/io/TiffDecoder.java:352–362  ·  view source on GitHub ↗
(long loc)

Source from the content-addressed store, hash-verified

350 }
351
352 double getRational(long loc) throws IOException {
353 long saveLoc = in.getLongFilePointer();
354 in.seek(loc);
355 double numerator = getUnsignedInt();
356 double denominator = getUnsignedInt();
357 in.seek(saveLoc);
358 if (denominator!=0.0)
359 return numerator/denominator;
360 else
361 return 0.0;
362 }
363
364 FileInfo OpenIFD() throws IOException {
365 // Get Image File Directory data

Callers 1

OpenIFDMethod · 0.95

Calls 3

getUnsignedIntMethod · 0.95
getLongFilePointerMethod · 0.80
seekMethod · 0.65

Tested by

no test coverage detected