Skip to content

Fixes needed for FIBSEM .dat format #16

@acardona

Description

@acardona

In line 210 of https://github.com/fiji/IO/blob/master/src/main/java/sc/fiji/io/FIBSEM_Reader.java, it reads, in the function readChannels:

		// it is always unsigned short
		final byte[] slice = new byte[ (int)header.xRes * (int)header.yRes * numChannels * 2 ];
		file.read( slice );
		final ByteBuffer buffer = ByteBuffer.wrap( slice );
		final ShortBuffer shortBuffer = buffer.asShortBuffer();

... which is not true. I have here some .dat files that are:

  • signed 16-bit (very surprisingly)
  • BIG_ENDIAN, so it needs ByteBuffer.wrap( slice ).order( ByteOrder.BIG_ENDIAN ) to be parsed correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions