Skip to content

Commit

Permalink
Assume N5 pixel data is always big endian
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Apr 29, 2020
1 parent b7b48dd commit 70137dd
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private class PyramidSeries {
/** Number of resolutions. */
int numberOfResolutions;

boolean littleEndian;
boolean littleEndian = false;

int planeCount = 1;
int z = 1;
Expand Down Expand Up @@ -517,7 +517,13 @@ public void initialize()
s.dimensionOrder =
metadata.getPixelsDimensionOrder(seriesIndex).toString();
s.planeCount = s.z * s.t;
s.littleEndian = !metadata.getPixelsBigEndian(seriesIndex);

// N5 format only allows big endian data
// Zarr format allows both
if (n5Reader instanceof N5ZarrReader) {
s.littleEndian = !metadata.getPixelsBigEndian(seriesIndex);
}

s.pixelType = FormatTools.pixelTypeFromString(
metadata.getPixelsType(seriesIndex).getValue());

Expand Down

0 comments on commit 70137dd

Please sign in to comment.