{
  "file": "field.f32",
  "dtype": "float32, little-endian",
  "shape": [
    153,
    92,
    76,
    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": [
    7243.8400,
    5423.1700,
    28015.0600
  ],
  "spacing": 187.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 20260411134726-2.400um-0.2m-78keV-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": 5.8234,
  "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": [
      13305.70,
      6735.07,
      28577.11
    ],
    "D(p)": [
      -0.7266590833460214,
      1.2326601726390436,
      1.8055277645798924
    ],
    "p + D(p)": [
      13304.973340916655,
      6736.302660172639,
      28578.91552776458
    ],
    "moving_m": [
      15893.5431,
      2846.3645,
      1050.8327
    ],
    "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)"
}
