Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data always saved as int16 #10

Open
rharkes opened this issue Aug 13, 2021 · 3 comments
Open

Data always saved as int16 #10

rharkes opened this issue Aug 13, 2021 · 3 comments

Comments

@rharkes
Copy link

rharkes commented Aug 13, 2021

It would be nice if npy2bdv would also offer the option to store data in a different datatype than int16. Maybe the writer could give a warning if data might have been altered? This is the case for any data not in [np.uint8 np.int8 np.int16].

@nvladimus
Copy link
Owner

Hi, @rharkes
The question is whether other formats are used in BigDataViewer for microscopy images. From my experience, microscopy data is almost always uint16. What's your application field? What format do you actually need?

@rharkes
Copy link
Author

rharkes commented Sep 8, 2021

I ran into the problem when binning multiple pixels together. The value of the sum went over 65535 so I thought to store them as uint32. But I agree this is probably an exception. However, after some analysis has been applied, data is often in float32 format. For example after convolution filters. Also we very often have multi channel data from confocal microscopes with 8 bit pixels per channel. There it is a bit of a waste to store and open them as uint16 I would say.

@nvladimus
Copy link
Owner

I agree that float32 makes sense to add. I am unfortunately quite busy at the moment to add and test this properly. As for int8 that some confocal scopes generate by default, I consider this a micro-crime, and it should be reported to microscopy police 👮 🔬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants