constantinpape / pybdv

python tools for BigDataViewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chunk boundaries visible as black cubes

martinschorb opened this issue · comments

Hi,

I have the problem that a BDV volume just generated shows clear black boundaries between the chunks while an older one of the same data doesn't.

Could you please check
/g/emcf/schorb/data/HH_platy/rec1/bdv/*.h5

that has the black boundaries vs.

/g/emcf/schorb/data/HH_platy/Platy*.h5

which is the original.

I suspect it has something to do with the volume dimensions not matching powers of 2, could that be? Here's the input volume /scratch/schorb/HH_platy/Platy-12601_rec.npy. I did another export with sizes exactly being multiples of 256:

/g/emcf/schorb/data/HH_platy/new.h5

and now the boundaries appear bright.
I will try again exporting to n5 and check...

Do you have an idea what could cause this and how to avoid these artifacts?

It only shows up in the downsampled layers, when I zoom in all the way, the boundaries disappear.

N5 gives me dark boundaries as well (for multiples of 256).

These are the attributes:

{"blockSize":[64,64,64],"compression":{"level":5,"type":"gzip"},"dataType":"uint16","dimensions":[2048,2048,1792],"downsamplingFactors":[1,1,1]}

at s0
and for s4:

{"blockSize":[64,64,64],"compression":{"level":5,"type":"gzip"},"dataType":"uint16","dimensions":[128,128,112],"downsamplingFactors":[16,16,16]}

Is it because the dimensions do not match the block size?

I think I have an idea why this is happening, what downscale_mode are you using when creating the data?

that's
'interpolate'

Could you try with mean and nearest and see if the same error occurs?

I looked into this and I am sure that it's only a problem with the interpolate mode.
I tried to fix the issue, but unfortunately I couldn't find a way to write a proper unittest for this, so I have added a warning for the interpolate mode.
@martinschorb Please use either mean (should be used for raw data) or nearest (should be used for label data) instead.