-
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
Lift 5d requirement for images and move multiscales description into spec #39
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,8 +124,8 @@ multiple levels of resolutions and optionally associated labels. | |
├── n # The name of the array is arbitrary with the ordering defined by | ||
│ │ # by the "multiscales" metadata, but is often a sequence starting at 0. | ||
│ │ | ||
│ ├── .zarray # All image arrays are 5-dimensional | ||
│ │ # with dimension order (t, c, z, y, x). | ||
│ ├── .zarray # All image arrays are up to 5-dimensional with dimension order (t, c, z, y, x). | ||
│ │ # An image without time dimension has axes (c, z, y, x) etc. | ||
│ │ | ||
│ ├── 0.0.0.0.0 # Chunks are stored with the flat directory layout. | ||
│ │ ... # Each dotted component of the chunk file represents | ||
|
@@ -207,8 +207,52 @@ keys as specified below for discovering certain types of data, especially images | |
|
||
Metadata about the multiple resolution representations of the image can be | ||
found under the "multiscales" key in the group-level metadata. | ||
The specification for the multiscale (i.e. "resolution") metadata is provided | ||
in [zarr-specs#50](https://github.com/zarr-developers/zarr-specs/issues/50). | ||
"multiscales" contains a list of dictionaries where each entry describes a multiscale image. | ||
constantinpape marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
"multiscales" MUST contain the field "datasets", which is a list of dictionaries describing | ||
constantinpape marked this conversation as resolved.
Show resolved
Hide resolved
|
||
the arrays storing the individual resolution levels. Each dictionary in "datasets" MUST | ||
contain the field "path", whose value contains the path to the array for this resolution relative | ||
to the root zarr group. The "path"s MUST be ordered from largest (i.e. highest resolution) to smallest. | ||
constantinpape marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
It SHOULD contain the field "name". | ||
|
||
It SHOULD contain the field "version", which indicates the version of the | ||
multiscale metadata of this image (current version is 0.1). | ||
|
||
It SHOULD contain the field "axes", which is a list of dimension names of the axes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the default behavior if Alternatively, the lifting of the 5D requirement could lead to increasing the requirement for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, maybe it's better to change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any thoughts @joshmoore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No immediate objection to breaking now along with this loosening of the 5D/strict-ordering version, but it might be nice as a part of this effort to plan out the next 1 or 2 large changes based on #35 and see which are also going to be breaking. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good point. I will try to summarise the current discussion in there later so we can see what else down the line might be breaking. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed to MUST now, also summarised potential changes: #35 (comment). As far as I can see none of this would be breaking with the current proposal for 0.2. |
||
If given, the values MUST be unique and one of `{"t", "c", "z", "y", "x"}`. | ||
The number of values MUST be the same as the number of dimensions of the arrays corresponding to this image. | ||
|
||
It SHOULD contain the field "type", which gives the type of downscaling method used to generate the multiscale image pyramid. | ||
It SHOULD contain the field "metadata", which contains a dictionary with additional information about the downscaling method. | ||
|
||
```json | ||
{ | ||
"multiscales": [ | ||
{ | ||
"version": "0.1", | ||
"name": "example", | ||
"datasets": [ | ||
{"path": "0"}, | ||
{"path": "1"}, | ||
{"path": "2"} | ||
], | ||
"axes": [ | ||
"t", "c", "z", "y", "z" | ||
constantinpape marked this conversation as resolved.
Show resolved
Hide resolved
|
||
], | ||
"type": "gaussian", | ||
"metadata": { # the fields in metadata depend on the downscaling implementation | ||
"method": "skimage.transform.pyramid_gaussian", # here, the paramters passed to the skimage function are given | ||
"version": "0.16.1", | ||
"args": "[true]", | ||
"kwargs": {"multichannel": true} | ||
constantinpape marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
|
||
If only one multiscale is provided, use it. Otherwise, the user can choose by | ||
name, using the first multiscale as a fallback: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a 3D array interpreted as
(z, y, x)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we promote "axes" to MUST, then the interpretation always depends on the metadata, i.e. on the values in "axes".