You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.md
+25-21Lines changed: 25 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -603,7 +603,7 @@ to do so by estimating the transformations' inverse if they choose to.
603
603
```
604
604
:::
605
605
606
-
```{hint}
606
+
```{note}
607
607
Exact reproducibility of pixel values for images transformed and resampled by
608
608
the transformation types here may differ across implementation and is therefore
609
609
out of the scope of this this specification.
@@ -956,6 +956,11 @@ defining a mapping from an input coordinate system to an output coordinate syste
956
956
The array contains either coordinates (absolute positions)
957
957
or displacements (relative shifts) for each point in the input space.
958
958
959
+
```{hint}
960
+
The `coordinates` and `displacements` transformations are not invertible in general,
961
+
but implementations MAY approximate their inverses.
962
+
```
963
+
959
964
**Array Structure**
960
965
961
966
The array containing the coordinates or displacements MUST:
@@ -964,6 +969,7 @@ The array containing the coordinates or displacements MUST:
964
969
to the corresponding coordinates in the input coordinate system via a coordinate transformation (see details below).
965
970
- have one dimension corresponding to every axis of the input coordinate system
966
971
- have one additional dimension to hold components of the vector (either coordinates or displacements)
972
+
- only be used to represent transformations between coordinate systems that are defined in smooth, regularly sampled coordinate arrays.
967
973
968
974
Metadata for these coordinate transforms have the following fields:
969
975
@@ -972,19 +978,28 @@ Metadata for these coordinate transforms have the following fields:
972
978
973
979
**interpolation**
974
980
: The interpolation attributes MAY be provided.
975
-
Its value indicates the interpolation to use if transforming points not on the array's discrete grid. Well-defined values include:
976
-
- `"nearest"` for nearest neighbor interpolation,
977
-
- `"linear"` for linear interpolation (default)
978
-
- `"bspline-cubic"` for cubic interpolation, etc.
981
+
Its value indicates the interpolation to use if transforming points not on the array's discrete grid.
982
+
983
+
The interpolation methods listed in this specification document refer to the methods described in {cite:t}`thevenaz2000image` and are not exhaustive.
984
+
- `"nearest"` for nearest neighbor interpolation (see {cite:t}`thevenaz2000image`, section 8.1),
985
+
- `"linear"` for linear interpolation (default, see {cite:t}`thevenaz2000image`, section 8.2),
986
+
- `"bspline-cubic"` for cubic interpolation (see {cite:t}`thevenaz2000image`, section 8.3 on "cubic B-splines).
979
987
980
988
Consumers SHOULD clearly communicate to users if a different interpolation method is used.
981
-
See also {cite:t}`thevenaz2000image` for more details on interpolation methods.
982
-
983
-
984
989
985
990
```{hint}
986
-
The `coordinates` and `displacements` transformations are not invertible in general,
987
-
but implementations MAY approximate their inverses.
991
+
The `interpolation` field refers to the method that is used to interpolate the `coordinate` or `displacement` array,
992
+
*not* the method used to interpolate the image when applying the transformation to an image.
993
+
The `interpolation` field, if provided, is not normative in the sense that usage of a different method is invalid under the spec.
994
+
Implementations may prefer to use faster methods for rendering (i.e., `linear` or `nearest`) but this may lead to pathological cases:
995
+
- If `nearest` interpolation is used for a `coordinates` transformation,
996
+
the transformed image collapses into a single point at the nearest coordinate in the coordinate field.
997
+
- If `nearest` interpolation is used for a `displacements` transformation,
998
+
the transformed image is piecewise constant with discontinuities at the boundaries between nearest neighbor regions.
999
+
1000
+
While choosing the specified interpolation methods can help to avoid these pathologies,
1001
+
implementations of the specified interpolation methods may still differ in their results.
1002
+
An exact reproducibility of pixel values for images transformed and resampled by this transformation is therefore out of the scope of this specification.
988
1003
```
989
1004
990
1005
**Array metadata**
@@ -1199,17 +1214,6 @@ I.e. the y-displacement is first, because the y-axis is the first element of the
1199
1214
1200
1215
:::
1201
1216
1202
-
```{warning}
1203
-
The `interpolation` field refers to the method that is used to interpolate the `coordinate` or `displacement` array,
1204
-
*not* the method used to interpolate the image when applying the transformation to an image.
1205
-
The `interpolation` field, if provided, is not normative in the sense that usage of a different method is invalid under the spec.
1206
-
Implementations may prefer to use faster methods for rendering (i.e., `linear` or `nearest`) but this may lead to pathological cases:
1207
-
- If `nearest` interpolation is used for a `coordinates` transformation,
1208
-
the transformed image collapses into a single point at the nearest coordinate in the coordinate field.
1209
-
- If `nearest` interpolation is used for a `displacements` transformation,
1210
-
the transformed image is piecewise constant with discontinuities at the boundaries between nearest neighbor regions.
0 commit comments