generated from w3c-ccg/markdown-to-spec
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Coordinate systems and new coordinate transformations proposal #138
Draft
bogovicj
wants to merge
122
commits into
ome:main
Choose a base branch
from
bogovicj:coord-transforms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
f0da62a
start of named space and transform metadata
bogovicj 4331deb
fwd and inv coordinate transforms
bogovicj 8051e71
Merge remote-tracking branch 'upstream/main' into coord-transforms
bogovicj 180568b
more transform details
bogovicj 4f48364
start page on details and recommendations
bogovicj 98a40de
transformation progress
bogovicj dd71953
change fields to camelCase
bogovicj 1b26a8e
add details for coordinate and displacement fields
bogovicj cd9c431
add details on dimension order
bogovicj e210027
clean up array indexing section
bogovicj d873541
add more details for scale, translation, displacement
bogovicj 63ed4ce
merge and cleanup
bogovicj a459492
Merge remote-tracking branch 'upstream/main' into coord-transforms
bogovicj 9058b4b
clarify input and output dimensionality for transforms
bogovicj 38ac6ac
update to transformations
bogovicj 3a2aae1
rotation transformation details
ed12192
minor rephrase intro to coordinateTransformations section
3ec8543
add details for bijection ct
bogovicj 30cade5
big changes to transformations spec
bogovicj df470d7
Add "coordinateSystems" and "coordinateTransformations" fields for ex…
bogovicj 99f3a4e
coordinate transformation updates:
bogovicj de73c68
update multiscales_example
bogovicj 163c8f4
rename dimensionWise byDimension
bogovicj 7b35c28
add more transformation examples
bogovicj 7baeed7
byDimension examples, rm input/outputAxes fields
bogovicj 162a9e9
reorder, simplify sections.
a90662d
clean up example formatting
32656e5
add array coordinate system example
0245ca9
rm duplicate editor names, typo fix
bogovicj a3ff0b5
fix sequence example json. add inverseOf to input/output field exception
0df402d
be clearer re: half-open interval
f05d480
move axes section into coordinateSystems section
bogovicj ed17ed5
typo fixes
bogovicj b9f89e1
Merge branch 'coord-transforms' of github.com:bogovicj/ngff into coor…
bogovicj cd01ab7
add two new coordinate transformation examples
bogovicj 86672e6
Allow tests to access all schemas
ivirshup b34875d
Fix how schemas are matched to examples
ivirshup 35ea3e3
Add initial coordinate system schemas
ivirshup 3fcba53
Add array coordinate schema
ivirshup 883ff1c
Add test for array coordinate system
ivirshup c2a18c4
Stop adding cases for .config files
ivirshup 027b55b
describe where to store coordinateTransformations
bogovicj 5bfe442
corrections for coordinates and displacements
bogovicj aab7469
add optional "longName" field for axes
bogovicj 9764451
Merge branch 'coord-transforms' into coord-transforms-schemas
ivirshup 098bfb8
Add longName property to axes schema
ivirshup f04ebef
Add mapAxis and mapIndex schemas
ivirshup ead1f7b
Add affine transfrom, use reference for path_w_url
ivirshup 281df32
Move rotation example to example directory
ivirshup 87d78e8
Add schema for rotation
ivirshup 033d4bb
Move inverseOf example to examples directory
ivirshup f78e441
Added schema for inverseOf
ivirshup 55e35bd
Added byDimension transformation
ivirshup 0833395
Sequence schemas
ivirshup 85808cf
Merge remote-tracking branch 'upstream/main' into coord-transforms
bogovicj 74466c5
Move rotation example to example directory
ivirshup 9406ce1
Merge branch 'coord-transforms' into coord-transforms-schemas
ivirshup ff2bc86
Move inverseOf example to examples directory
ivirshup a68523f
multiscales example relative typo fix
bogovicj 3fe7aa2
corrections and clarifications to coordinates and displacements
bogovicj f976a87
transforms MUST have "input"
bogovicj 72b4f9c
cts: remove url parameters
bogovicj be7d849
ct: fix and clarify nested json representation for affine and rotatio…
bogovicj da94207
motivate coordinate systems
bogovicj b92f540
describe discrete axes, interpolation, etc
bogovicj 383aa87
spec: remove 5D limits
d-v-b 1849133
tforms: more details to conforming readers
bogovicj a2e7687
tforms: more sensible output name for sequence transform example
bogovicj 5ce238a
tforms: typo fix
bogovicj 676aeba
tforms: fix name of zgroup in example hierarchy comment
bogovicj be61476
Merge remote-tracking branch 'dvb/coord-transforms' into coord-transf…
bogovicj 578dd72
fix header and link for axes metadata
bogovicj c33287d
example coordinate systems follow recommendations
bogovicj 6da38f7
rm mapIndex transformation
bogovicj 1451a47
start of coordinatTransformations schema
bogovicj 1602832
missing_scale and duplicate_scale are valid
bogovicj 417c7cd
Merge branch 'coord-transforms' into coord-transforms-schemas
bogovicj 3c86a3b
rm mapIndex examples
bogovicj 9021ae0
affine parameters can be nested arrays
bogovicj 841e0aa
rm mapIndex from transform schema
bogovicj 704173c
add bijection transformation to schema
bogovicj 03fe664
add displacements and coordinates transformations to schema
bogovicj 34e41d3
update tests with coordinateSystems
bogovicj a24aefd
update image schema with coordinate systems
bogovicj d22b663
axis schema: don't enforce types
bogovicj 7add879
test: strict_image add coordinateSystems
bogovicj e5b351c
test image, strict_image add input/output to transforms
bogovicj 9abfa1e
start to modularize coordinate systems and transforms schemas
bogovicj b7c28f9
axes schema: allow at most three space axes
bogovicj 5818a1f
image_suite - one axis is valid
bogovicj 3896ab4
image_suite - two scales are valid, but not recommended
bogovicj 2f7c413
edit subspace example
bogovicj 67cb6d2
coordinate_transformation arrays may not be empty
bogovicj fb88485
edit example byDimension2
bogovicj 85437f2
edit multiscales examples
bogovicj a9fadf3
add schema config for subspace examples
bogovicj a0cd017
rm coordinate_transforms.schema
bogovicj 150f1f8
multiscales-strict, re-order coordinate systems
bogovicj 61eb70a
schema: add strict_axes, and strict_coordinate_systems
bogovicj 0eb5040
Merge remote-tracking branch 'origin/coord-transforms-schemas' into c…
bogovicj aa0542d
correct byDimensionXarray transform example
bogovicj bc4f395
"units" -> "unit"
bogovicj 802c94f
toward clarity on axis order
bogovicj 51417a6
typo fix
bogovicj cd92ec1
rm spurious / in <img>
bogovicj 701867e
clarify axis order for coordinate and displacement fields
bogovicj 81cc4a5
minor rephrasing in inverseOf
bogovicj 7dec4fe
toward resolving ambiguity in "sequence" transformations
bogovicj 6ebcf5f
add anchors for transformation types
bogovicj 00b79f1
clarification on affine and rotation transformation
bogovicj 88b5f16
minor rephrasing
bogovicj cc6ade0
remove reference to non-existent note
bogovicj 11729de
matrix transformations MUST be stored as 2D (json or zarr) arrays
bogovicj 8e9bdb6
typo affine -> rotation
bogovicj d311848
merge edits from rfc
bogovicj b5ed81a
change examples to relative paths
bogovicj 12a5338
typo and other minor fixes
bogovicj 5376db5
fix affine matrix size, and other small fixes
bogovicj 50e7759
correctly close code block
bogovicj e8bc1db
clarify invertibility of sequence transformation
bogovicj 7d71127
fix byDimension header link
bogovicj 3a7e76f
flesh out description for coordinates and displacements
bogovicj 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
rotation transformation details
* rephrase matrix storage
- Loading branch information
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 | ||||
---|---|---|---|---|---|---|
|
@@ -356,13 +356,12 @@ of some coordinate transformations (see the Details section below will note thos | |||||
<tr><th>`affine` | ||||||
<td> one of: <br>`"affine":List[number]`, <br>`"path":str` | ||||||
<td>affine transformation matrix stored as a flat array stored either with json uing the affine field | ||||||
or as binary data at a location in this container (path). If both are present, path is | ||||||
preferred. | ||||||
or as binary data at a location in this container (path). If both are present, the binary values at path should be used. | ||||||
<tr><th>`rotation` | ||||||
<td> one of: <br>`"rotation":List[number]`, <br>`"path":str` | ||||||
<td>rotation transformation matrix stored as a flat array stored either with json uing the rotation field | ||||||
or as binary data at a location in this container (path). If both are present, path is | ||||||
preferred. | ||||||
<td>rotation transformation matrix stored as an array stored either | ||||||
with json or as binary data at a location in this container (path). | ||||||
If both are present, the binary parameters at path are used. | ||||||
<tr><th>`sequence` | ||||||
<td> `"transformations":List[Transformation]` | ||||||
<td>A sequence of transformations, Applying the sequence applies the composition of all transforms in the | ||||||
|
@@ -448,7 +447,7 @@ y = j - 1 | |||||
#### scale | ||||||
|
||||||
`scale` transformations are special cases of affine transformations. When possible, a scale transformation | ||||||
should be preferred to its equivalent affine. Input and output dimensionality MUST be identical and MUST equal | ||||||
SHOULD be defined to its equivalent affine. Input and output dimensionality MUST be identical and MUST equal | ||||||
the the length of the "scale" array. Values in the `scale` array SHOULD be non-zero; in that case, `scale` | ||||||
transformations are invertible. | ||||||
|
||||||
|
@@ -495,8 +494,10 @@ The matrix may be stored as a 2D array or as a 1D array (row-major). | |||||
<dd> An optional URL to the container in which the affine array is stored. If not provided, | ||||||
the provided `path` MUST exist in this container.</dd> | ||||||
<dt><strong>affine</strong></dt> | ||||||
<dd> The affine parameters stored in JSON. If stored as a flat list of numbers the list MUST be length `N*(M+1)`. | ||||||
If stored as a list of lists, the outer list MUST be length `N`, and inner lists MUST be length `(M+1)`.</dd> | ||||||
<dd> The affine parameters stored in JSON. The matrix may be stored | ||||||
as a row-major flat list of numbers the list MUST be length `N*(M+1)`. If stored as a list of | ||||||
lists, the outer list MUST be length `N`, and all inner lists MUST be | ||||||
length `(M+1)`. In this case, inner lists contain rows of the matrix. </dd> | ||||||
</dl> | ||||||
|
||||||
<div class=example> | ||||||
|
@@ -549,6 +550,51 @@ The matrix may be stored as a 2D array or as a 1D array (row-major). | |||||
</div> | ||||||
|
||||||
|
||||||
#### rotation | ||||||
|
||||||
`rotation` transformations are special cases of affine transformations. | ||||||
When possible, a rotation transformation SHOULD be defined rather than | ||||||
its equivalent affine. Input and output dimensionality (N) MUST be | ||||||
identical and greater than 1. Rotations are stored as `NxN` matrices, | ||||||
see below, and MUST have determinant equal to one, with orthonormal rows | ||||||
and columns. `rotation` transformations are invertible. | ||||||
|
||||||
<dl> | ||||||
<dt><strong>path</strong></dt> | ||||||
<dd> The path to an array containing the affine parameters. | ||||||
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.
Suggested change
|
||||||
The array at this path MUST be 1D or 2D. If 1D, its length MUST be `N*N`. | ||||||
If 2D, its shape MUST be `N x N`.</dd> | ||||||
<dt><strong>url</strong></dt> | ||||||
<dd> An optional URL to the container in which the affine array is stored. If not provided, | ||||||
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.
Suggested change
|
||||||
the provided `path` MUST exist in this container.</dd> | ||||||
<dt><strong>rotation</strong></dt> | ||||||
<dd>The rotation parameters stored in JSON. The matrix may be stored | ||||||
as a row-major flat list of numbers. Int that case, the list MUST be | ||||||
length `N*N`. The matrix may bes stored a list of lists, the outer list MUST be | ||||||
length `N`, and all inner lists MUST be length `N`. In this case, | ||||||
inner lists contain rows of the matrix. </dd> | ||||||
</dl> | ||||||
|
||||||
<div class=example> | ||||||
A 2D example | ||||||
```json | ||||||
{ | ||||||
"type": "rotation", | ||||||
"affine": [0, 1, 1, 0], | ||||||
"input" : ["i", "j"], | ||||||
"output" : ["x", "y"] | ||||||
} | ||||||
``` | ||||||
|
||||||
defines the function: | ||||||
|
||||||
``` | ||||||
x = 0*i + 1*j | ||||||
y = 1*i + 0*j | ||||||
``` | ||||||
</div> | ||||||
|
||||||
|
||||||
#### sequence | ||||||
|
||||||
A `sequence` transformation consist of an ordered array of coordinate transformations. | ||||||
|
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.
Just curious: Is there a good reason to not inline the affine (or rotation) transformation matrix?
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.
yes. here's a good reason #146
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.
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 I understand #146 correctly, that is an argument for a nested json array (e.g.
[[1,2,3],[4,5,6]]
) instead of a separate Zarr array.I think the separate Zarr array introduces quite an overhead (at least 2 requests) for a tiny piece of information.
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.
correct, I must have misunderstood you. For the question, "why store transform parameters as a zarr array", the reason is here: #101 (comment)