-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add scale factors used for MIP to multiscales metadata #53
Comments
Thanks @constantinpape, at least from my sidem it definitely feels as useful top-level addition that would reduce the need to compute these value on-the-fly. My initial inclination would be to store these as The BDV downsampling specification makes use of the assumptions that a |
Why does bigdataviewer require downsampling factors and not simply the grid spacing of each image? This seems like something that should be fixed on the bigdataviewer side instead of something this spec should support. |
I agree, these are fairly equivalent and I don't have a strong preference either.
Good point. We should demand that the length is the same as
bigdataviewer requires the grid spacing of the image at the lowest scale and the downsampling factors for the other images. I assume that it computes the grid spacing for the other scales based on this information internally. There might also be a way to set the grid sampling for all scales without the need for the sampling factors, I am not familiar enough with the details to know. I think this brings us back to the transformation discussion and shows that are two different options for this:
|
I am 100% opposed to the second option. My mantra is "multiresolution datasets are just collections of datasets", which entails that there is nothing special about the highest or lowest resolution levels. They are all just images, and so they should all have the same kinds of spatial metadata. Bigdataviewer should deprecate |
Hi guys, just read this thread and wanted to mention an aspect potentially important for designing multiscale metadata: Depending on the method used to calculate the differently scaled images, their translational offset can vary. E.g. a 2x2 binned image has a different offset (with respect to its full resolution image) compared to an image created by subsampling every second pixel. Therefore it would make sense for this to be reflected in the multiscale metadata (at least optionally). Also, acknowledging this fact that lower res images can result from a range of operations (binning, subsampling, etc.), indicates that using spacings as opposed to "downsamplingfactors" might be more precise and less ambiguous. |
A little clarification: Bigdataviewer (the viewer) does not require The fundamental thing for bdv is a list of affines, one per scale level, (see here for example). The first thing it does is to convert to an affine. Other similar implementations such as I'd rather we didn't use |
Thanks for the clarification @bogovicj; I haven't dug into the BDV code so much myself and only looked at the "default" path, which instantiates the viewer from the metadata with
Ok, I think there is pretty strong support for not specifying downsamplingFactors and providing a trafo per scale instead. I agree that this solution is cleaner. |
The
multiscales
metadata currently does not contain any information about the downscaling factors used for generating the different scale datasets (MIP). This information is necessary for visualisation in a couple of tools, e.g. bigdataviewer. See the bdv.n5 format for an example on how to store it. As a workaround, we have been computing the factors on the fly based on the extent of the scale datasets/arrays.However, there are some corner cases, e.g. if the extents are not divisible by the scale factors. So I think it would be good to add this as an (optional) field to the metadata.
We could either add it in a similar fashion to BDV and add a field
downsamplingFactors = [[1, 1, 1], [2, 2, 2], [4, 4, 4], ...]
.Or we could add it to the
datasets
field:"datasets": [{"path": "0", "downsamplingFactor": [1, 1, 1]}, {"path": "1", "downsamplingFactor": [2, 2, 2]}, ...]
.The text was updated successfully, but these errors were encountered: