-
Notifications
You must be signed in to change notification settings - Fork 0
pixel resolution notes v0.4
John Bogovic edited this page Feb 24, 2023
·
1 revision
For all these examples, assume the axes
are :
[
{"name": "y", "type": "space", "unit": "micrometer"},
{"name": "x", "type": "space", "unit": "micrometer"}
]
We will represent an image with
- a pixel resolution of 0.1 in y and 0.3 in x,
- two scale levels, where scale level "1" is downsampled by a factor of two relative to "0".
How I would do it - every scale level's transform describes its physical resolution.
{
"datasets": [
{
"path": "0",
"coordinateTransformations": [{ "type": "scale", "scale": [0.1, 0.3] }]
},
{
"path": "1",
"coordinateTransformations": [{ "type": "scale", "scale": [0.2, 0.6] }]
}
]
}
Another valid and reasonable way to do it. "datasets" transformations are relative to the highest scale, and the "outer" transformation encodes resolution.
{
"datasets": [
{
"path": "0",
"coordinateTransformations": [] // equivalent to the identity
},
{
"path": "1",
"coordinateTransformations": [{ "type": "scale", "scale": [2, 2] }]
}
],
"coordinateTransformations": [{ "type": "scale", "scale": [0.1, 0.3] }],
}
This is equivalent to the above, but please don't do this!!!
{
"datasets": [
{
"path": "0",
"coordinateTransformations": [{ "type": "scale", "scale": [-0.01, 3.0] }]
},
{
"path": "1",
"coordinateTransformations": [{ "type": "scale", "scale": [-0.02, 6.0] }]
}
],
"coordinateTransformations": [{ "type": "scale", "scale": [-10, 0.1] }],
}