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

Method getFloat

ij/src/main/java/ij/plugin/DICOM.java:428–446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426 }
427
428 float getFloat() throws IOException {
429 int b0 = getByte();
430 int b1 = getByte();
431 int b2 = getByte();
432 int b3 = getByte();
433 int res = 0;
434 if (littleEndian) {
435 res += b0;
436 res += ( ((long)b1) << 8);
437 res += ( ((long)b2) << 16);
438 res += ( ((long)b3) << 24);
439 } else {
440 res += b3;
441 res += ( ((long)b2) << 8);
442 res += ( ((long)b1) << 16);
443 res += ( ((long)b0) << 24);
444 }
445 return Float.intBitsToFloat(res);
446 }
447
448 byte[] getLut(int length) throws IOException {
449 if ((length&1)!=0) { // odd

Callers 1

getHeaderInfoMethod · 0.95

Calls 1

getByteMethod · 0.95

Tested by

no test coverage detected