You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the ome.tiff metadata the pixel type is "float" while numpy conversion is np.float32.
$ ashlar Cycle0.companion.ome Cycle1.companion.ome -c0
Stitching and registering input images
Cycle 0:
reading Cycle0.companion.ome
WARNING: Stage coordinates' measurement unit is undefined; assuming μm.
assembling thumbnail 1/439Traceback (most recent call last):
File "/home/jmamede/anaconda3/envs/tensorflow/bin/ashlar", line 8, in <module>
sys.exit(main())
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/scripts/ashlar.py", line 212, in main
return process_single(
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/scripts/ashlar.py", line 243, in process_single
edge_aligner.run()
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 486, in run
self.make_thumbnail()
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 497, in make_thumbnail
self.reader.thumbnail = thumbnail.make_thumbnail(
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/thumbnail.py", line 20, in make_thumbnail
img = reader.read(c=channel, series=i)
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 431, in read
img = self.reader.read(series, c)
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 405, in read
dtype = self.metadata.pixel_dtype
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 304, in pixel_dtype
return self._pixel_dtypes[self._metadata.getPixelsType(0).value]
KeyError: 'float'
I tried to comment line 405 in reg.py
# dtype = self.metadata.pixel_dtype
to dtype = np.float32
and the error goes away.
if I try to do something like
if dtype == 'float':
dtype = np.float32
print('manually changing dtype')
It still fails as the error happens at the moment of the self.metadata_pixel_dtype call.
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/home/jmamede/anaconda3/envs/tensorflow/bin/ashlar", line 8, in <module>
sys.exit(main())
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/scripts/ashlar.py", line 212, in main
return process_single(
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/scripts/ashlar.py", line 250, in process_single
mosaics.append(reg.Mosaic(edge_aligner, mshape, **mosaic_args_final))
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 996, in __init__
self.dtype = aligner.metadata.pixel_dtype
File "/home/jmamede/anaconda3/envs/tensorflow/lib/python3.9/site-packages/ashlar/reg.py", line 304, in pixel_dtype
return self._pixel_dtypes[self._metadata.getPixelsType(0).value]
KeyError: 'float'
However, the output is between 0 and 1 and very saturated. I believe it to be the light correction. I also tried pushing the 'float' be assume to be a uint32 or uint16 dtype and the same happens.
In the ome.tiff metadata the pixel type is "float" while numpy conversion is np.float32.
I tried to comment line 405 in reg.py
# dtype = self.metadata.pixel_dtype
to
dtype = np.float32
and the error goes away.
if I try to do something like
It still fails as the error happens at the moment of the self.metadata_pixel_dtype call.
The text was updated successfully, but these errors were encountered: