considering down-converting float64 to float32 when saving?
See original GitHub issue❓ Question
Should we consider making the builtin napari_write_image
implementation default converting 64 bit float to 32 bit float? I wonder how many people are going to save a tiff from napari and run into an error when they try to open it in Fiji…
Of course, we need to somehow open up control to users… but just wanted to flag that potential near-term issue.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Go: Why does converting from a float64 to a float32 and ...
float32 has less precision than float64 . Neither type can exactly represent the real number -3942.2, but float64 gets closer.
Read more >Consequence of using single (float32) or double (float64) ...
When saving interpolated data (after linear or non-linear warps but also as well as internal representation) we often face the decision if single...
Read more >Float32, Float64 | ClickHouse Docs
Float64 — DOUBLE . When creating tables, numeric parameters for floating point numbers can be set (e.g. FLOAT(12) , FLOAT(15, 22) ...
Read more >Issue with PointType update from Float32 to Float64 - PI Square
We have changed pointtype from Float32 to Float64 as it support accuracy till 15 digits. The changes are saved in PI Data archive...
Read more >How to convert Int data type to Float in Golang?
Explanation: Firstly we declare a variable x of type int64 with a value of 5. Then we wrap x with float64(), which converts...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem is that ImageJ1 does not support 64-bit floating point images. Only ImageJ2/ImgLib2 supports that. Bio-Formats can open them but it must ultimately downcast it to 32-bit (because the Bio-Formats Importer is still built on ImageJ1). If you use File > Import > Image… to invoke SCIFIO, you should get a true 64-bit floating point image. But displaying it in the legacy ImageJ UI (the default Fiji uses), it’ll still say “32-bit” in the title bar because it has to lazily downcast it to 32-bit to make ImageJ1 happy.
The good news is that if you use PyImageJ and write e.g.
img = ij.io().open(my64bitTIFFfile)
you should get back a 64-bitDataset
object, which can be turned into a numpy (soon to be xarray) object usingij.py.from_java(img)
. Let me know if that doesn’t work!Sorry the situation is so complicated, guys. 😦
a ha, yes indeed! see i was doing something wrong! 😃