Skip to content

Commit b811559

Browse files
committed
chore: Example formatting
1 parent 741d95d commit b811559

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

index.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,16 @@ Example metadata for the array data at path `i2xCoordinates` above:
10891089
Here, the axis `i` refers to the input positions along the `i`-axis (i.e., pixel indices).
10901090
The `c` axis holds the corresponding output coordinates.
10911091

1092-
If the array in `coordinates` contains the data: `[-9, 9, 0]`, then this metadata defines the following function to map
1092+
If the array in `coordinates` contains the data:
1093+
```
1094+
[
1095+
[-9], // Output coordinate for i=0
1096+
[9], // Output coordinate for i=1
1097+
[0] // Output coordinate for i=2
1098+
]
1099+
```
1100+
1101+
then this metadata defines the following function to map
10931102
the `i` axis (`input` coordinate system) to the `x` axis (`output` coordinate system):
10941103

10951104
```
@@ -1142,7 +1151,16 @@ Example metadata for the array data at path `displacements` above:
11421151
Since the input and output coordinate system may be defined in physical units,
11431152
a scale transformation is needed to map the displacement vectors into the same physical units as the input point.
11441153

1145-
If the array in `displacements` contains the data: `[-1, 0, 1]`,
1154+
If the array in `displacements` contains the data:
1155+
1156+
```
1157+
[
1158+
[-1], // Displacement for x=0
1159+
[0], // Displacement for x=1
1160+
[1] // Displacement for x=2
1161+
]
1162+
```
1163+
11461164
this transformation maps the point `[1.0]` to the point `[0.5]`.
11471165
A scale transformation maps the array coordinates to the `x` axis.
11481166
Using the inverse of the scale transform, we see that we need the position `0.5` in array coordinates.
@@ -1152,7 +1170,7 @@ That value gives us the displacement of the input point,
11521170
hence the output is `1.0 + (-0.5) = 0.5`.
11531171
:::
11541172

1155-
:::{dropdown} Example 3: 3D displacement transformation
1173+
:::{dropdown} Example 3: 2D displacement transformation
11561174

11571175
In this example, the array located at `displacementField` MUST have three dimensions.
11581176
One dimension MUST correspond to an axis with `type : displacement` (in this example, the last dimension),

0 commit comments

Comments
 (0)