bigdataviewer / bigdataviewer-core

ImgLib2-based viewer for registered SPIM stacks and more
BSD 2-Clause "Simplified" License
33 stars 35 forks source link

zero value always shown as black even for signed int source #126

Closed martinschorb closed 3 years ago

martinschorb commented 3 years ago

Hi,

I have a source (N5) which is normalized signed int data. BDV displays it just fine and also contrast adjustment works. However, the zero value is always mapped to appear as black, even though the minimum selector is set to a negative value. This leads to black contour lines in the displayed data.

martinschorb commented 3 years ago

Screenshot 2021-06-18 at 16 02 46

tpietzsch commented 3 years ago

Can you share a test data set to reproduce? Also, is this in vanilla BDV or MoBIE Viewer or something similar? (It could be that this is some custom source blending code)

martinschorb commented 3 years ago

Hi,

yes, you are right:

I guess @NicoKiaru , this one's for you then...

martinschorb commented 3 years ago

Test data:

BDV_testzero.zip

supposed to show nice gradients from -20 to +20 intensity.

NicoKiaru commented 3 years ago

Mapping 'zero' as black or actually transparent has been a trick used to enable transparency, but I've now added a way to handle better transparency, and also 'layers', ( see https://github.com/NicoKiaru/bigdataviewer-playground-display). Also, the 'default' bdv used in bdv-playground can now be set by the user. It can be the vanilla one, the mobie one, the 'transparent' one, the biop one. Each of these have different features enabled by default. If @tischi wants to provide a different one, he can also do this on mobie's repo.

All of this is not currently on the update site of bdv-pg. This week I hope to release it, and I think @tischi is ready for it ?

Cheers

tischi commented 3 years ago

This week I hope to release it, and I think @tischi is ready for it ?

I think I tried it and it worked for me.