generated from w3c-ccg/markdown-to-spec
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Finalize axes & initial transformation #85
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
af0f626
Rename transformations to coordinateTransformations
constantinpape 97d66fb
Remove axis indices
constantinpape b863e0e
Further clarifications
constantinpape f3dc3f1
Rename transformations to coordinateTransformations in example
constantinpape 0241254
Mandatory scale transformation for datasets
constantinpape c9d2e3e
Clarify the multiscale level transformation
constantinpape 4b376a3
Update latest/index.bs
sbesson 37e64a1
Update latest/index.bs
sbesson cc76444
Update latest/index.bs
sbesson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,10 +222,11 @@ keys as specified below for discovering certain types of data, especially images | |
If part of [[#multiscale-md]], the length of "axes" MUST be equal to the number of dimensions of the arrays that contain the image data. | ||
|
||
|
||
"transformations" metadata {#trafo-md} | ||
"coordinateTransformations" metadata {#trafo-md} | ||
------------------------------------- | ||
|
||
"transformations" describes a series of transformations, e.g. to map discrete data space of an array to the corresponding physical space. | ||
"coordinateTransformations" describe a series of transformations that map between two coordinate spaces (defined by "axes"). | ||
For example, to map a discrete data space of an array to the corresponding physical space. | ||
It is a list of dictionaries. Each entry describes a single transformation and MUST contain the field "type". | ||
The value of "type" MUST be one of the elements of the `type` column in the table below. | ||
Additional fields for the entry depend on "type" and are defined by the column `fields`. | ||
|
@@ -236,9 +237,6 @@ Additional fields for the entry depend on "type" and are defined by the column ` | |
| `translation` | one of: `"translation":List[float]`, `"path":str` | translation vector, stored either as a list of floats (`"translation"`) or as binary data at a location in this container (`path`). The length of vector defines number of dimensions. | | ||
| `scale` | one of: `"scale":List[float]`, `"path":str` | scale vector, stored either as a list of floats (`scale`) or as binary data at a location in this container (`path`). The length of vector defines number of dimensions. | | ||
|
||
In addition, the field "axisIndices" MAY be given to specify the subset of axes that the transformation is applied to, leaving other axes unchanged. If not given, the transformation is applied to all axes. The length of "axisIndices" MUST be equal to the dimensionality of the transformation. If "axisIndices" are not given, the dimensionality of the transformation MUST be equal to the number of dimensions of the space that the transformation is applied to. | ||
If given, "axisIndices" MUST be given in increasing order. It uses zero-based indexing. | ||
|
||
The transformations in the list are applied sequentally and in order. | ||
sbesson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
|
@@ -263,17 +261,16 @@ Each dictionary in "datasets" MUST contain the field "path", whose value contain | |
to the current zarr group. The "path"s MUST be ordered from largest (i.e. highest resolution) to smallest. | ||
|
||
Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes". | ||
Each dictionary MAY contain the field "transformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level. | ||
The transformations are defined according to [[#trafo-md]]. In addition, the transformation types MUST only be `identity`, `translation` or `scale`. | ||
They MUST contain at most one `scale` transformation per axis that specifies the pixel size in physical units. | ||
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. The "per axis" should be kept if we keep the 'global' transformation. |
||
It also MUST contain at most one `translation` per axis that specifies the offset from the origin in physical units. | ||
If both `scale` and `translation` are given `translation` must be listed after `scale` to ensure that it is given in physical coordinates. If "transformations" is not given, the identity transformation is assumed. | ||
The requirements (only `scale` and `translation`, restrictions on order) are in place to provide a simple mapping from data coordinates to physical coordinates while | ||
being compatible with the general transformation spec. | ||
|
||
Each "multiscales" dictionary MAY contain the field "transformations", describing transformations that are applied to each resolution level. | ||
The transformations MUST follow the same rules about allowed types, order, etc. as in "datasets:transformations". | ||
These transformations are applied after the per resolution level transformations specified in "datasets". They can for example be used to specify the `scale` for a dimension that is the same for all resolutions. | ||
Each dictionary MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level. | ||
The transformations are defined according to [[#trafo-md]]. The transformation types MUST only be `translation` or `scale`. | ||
sbesson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes set it to 1. | ||
It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it must be listed after `scale` to ensure that it is given in physical coordinates. | ||
sbesson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The length of the `scale` and `translation` array MUST be the same as the length of "axes". | ||
The requirements (only `scale` and `translation`, restrictions on order) are in place to provide a simple mapping from data coordinates to physical coordinates while being compatible with the general transformation spec. | ||
|
||
Each "multiscales" dictionary MAY contain the field "coordinateTransformations", describing transformations that are applied to all resolution levels in the same manner. | ||
The transformations MUST follow the same rules about allowed types, order, etc. as in "datasets:coordinateTransformations" and are applied after them. | ||
They can for example be used to specify the `scale` for a dimension that is the same for all resolutions. | ||
|
||
Each "multiscales" dictionary 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.4). | ||
|
||
|
@@ -296,18 +293,18 @@ It SHOULD contain the field "metadata", which contains a dictionary with additio | |
"datasets": [ | ||
{ | ||
"path": "0", | ||
"transformations": [{"type": "scale", "scale": [0.5, 0.5, 0.5], "axisIndices": [2, 3, 4]}] # the voxel size for the first scale level (0.5 micrometer) | ||
"coordinateTransformations": [{"type": "scale", "scale": [1.0, 1.0, 0.5, 0.5, 0.5]}] # the voxel size for the first scale level (0.5 micrometer) | ||
} | ||
{ | ||
"path": "1", | ||
"transformations": [{"type": "scale", "scale": [1.0, 1.0, 1.0], "axisIndices": [2, 3, 4]}] # the voxel size for the second scale level (downscaled by a factor of 2 -> 1 micrometer) | ||
"coordinateTransformations": [{"type": "scale", "scale": [1.0, 1.0, 1.0, 1.0, 1.0]}] # the voxel size for the second scale level (downscaled by a factor of 2 -> 1 micrometer) | ||
}, | ||
{ | ||
"path": "2", | ||
"transformations": [{"type": "scale", "scale": [2.0, 2.0, 2.0], "axisIndices": [2, 3, 4]}] # the voxel size for the second scale level (downscaled by a factor of 4 -> 2 micrometer) | ||
"coordinateTransformations": [{"type": "scale", "scale": [1.0, 1.0, 2.0, 2.0, 2.0]}] # the voxel size for the second scale level (downscaled by a factor of 4 -> 2 micrometer) | ||
} | ||
], | ||
"transformations": [{"type": "scale", "scale": [0.1], "axisIndices": [0]], # the time unit (0.1 milliseconds), which is the same for each scale level | ||
"coordinateTransformations": [{"type": "scale", "scale": [0.1, 1.0, 1.0, 1.0, 1.0]], # the time unit (0.1 milliseconds), which is the same for each scale level | ||
sbesson 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 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It looks like this table still isn't rendered correctly:
I don't understand why. Could someone with more bikeshed experience give this a shot? cc @joshmoore @will-moore @sbesson
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.
I think I tried this way back on the previous PR, but didn't get much joy. I think @joshmoore suggested using an HTML table?