{
  "file": "field.f32",
  "dtype": "float32, little-endian",
  "shape": [
    32,
    14,
    29,
    3
  ],
  "layout": "C order [nz][ny][nx][3]: node (k, j, i) = (z, y, x index); the last axis is the displacement (dx, dy, dz)",
  "origin_xyz": [
    8053.4600,
    10118.4600,
    18543.3100
  ],
  "spacing": 101.0000,
  "node_position": "node (k, j, i) sits at fixed level-0 voxel (x, y, z) = origin_xyz + spacing * (i, j, k)",
  "frame": "fixed volume 20250526151718-2.215um-0.4m-111keV-masked, level-0 voxels, x y z",
  "units": "fixed level-0 voxels",
  "interpolation": "trilinear between nodes; outside the grid the edge nodes are used (clamped)",
  "max_abs_displacement": 6.9433,
  "direction": "D is defined on the fixed grid and pulls back to the moving scan: for a fixed point p, the moving point is m = T^-1 (p + D(p)), T = transform.json transformation_matrix (moving -> fixed)",
  "compose": {
    "fixed_to_moving": "m = T^-1 (p + D(p))",
    "moving_to_fixed": "p = T(m) - D(p): iterate p_0 = T(m), p_{k+1} = T(m) - D(p_k) (|grad D| << 1: converges in a few steps)",
    "affine_only": "p ~ T(m); error up to max_abs_displacement"
  },
  "worked_example": {
    "fixed_p": [
      9471.22,
      10455.75,
      18746.07
    ],
    "D(p)": [
      3.8349983605821762,
      -1.7989470571574202,
      -1.4390284115434042
    ],
    "p + D(p)": [
      9475.054998360582,
      10453.951052942843,
      18744.630971588456
    ],
    "moving_m": [
      148.9676,
      5871.2373,
      742.7629
    ],
    "check": "T(moving_m) = p + D(p); ufsm reg map reg.json x,y,z gives moving_m, ufsm reg map reg.json --f2c mx,my,mz gives p back"
  },
  "tool": "ufsm reg map reg.json [--f2c] x,y,z (github.com/SuperOptimizer/ufsm, src/reg.h)"
}
