Closed SilverViking closed 3 years ago
g:\xx\Testfiles\Fluo\3x-16bit\SlideExpress20x.nd2 has the same problem: colors are wrong, and there is a diagonal pattern (and horizontal stripes). Zoom in on the top left corner of the image to see them.
The nd2 metadata {'width': 5735, 'width_bytes': 34412, 'height': 7563, 'components': 3, 'bitsize_memory': 16,...}
again shows that width_bytes != 3 components * 2 bytes/component * width in pixels
.
Solved (in nis2pyr >= v0.4.0) by switching from pims_nd2
to the more robust nd2
library for reading ND2 files.
Reproduce with
python nis2pyr.py "g:\xx\Testfiles\BF\RGB-8bit\Slide2-3-1_ChannelBrightfield_Seq0001.nd2" e:\temp\bug.ome.tif
Part of the nd2 metadata:
Note that
width_bytes != components * width
so perhaps the bug is related to nd2reader not handling padding bytes correctly?