ome / ngff

Next-generation file format (NGFF) specifications for storing bioimaging data in the cloud.
https://ngff.openmicroscopy.org
Other
115 stars 38 forks source link

Simplifying multiscale coordinateTransformations #201

Closed clbarnes closed 1 year ago

clbarnes commented 1 year ago

Currently, in order to get a mapping from data to world coordinates for a given scale level, you need to look at up to 3 different coordinateTransformations fields: one on the single-scale of interest, one on the first single-scale of the datasets array (unless I've misunderstood [1]), and then the multiscales-level coordinate transformations. Including the multiscales-level transformation may reduce some duplication, but it means that scale level coordinateTransforms do not map from data to world coordinates. The deduplication is conditional, too - order constraints on coordinate transformations mean that if you have a scale in the multiscale-level transforms, you can't have any translations in the scale level transforms, so if you had those transformations (common in half-pixel offsets for downscaling), you'd need to duplicate the top-level scale anyway.

Would it be simpler to say "the coordinateTransformations field on each single-scale object describes the mapping from data to world coordinates", by getting rid of A) any interdependency between different scale levels and B) the multiscale-level transforms? As the transformations themselves become more complicated (e.g. #138 , which is at least explicit about the interdependency), simplifying the lookup and chaining of transforms in different places might be nice.

1: "If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis."

clbarnes commented 1 year ago

This seems to be discussed in #172