Skip to content

N5 Metadata Dialects

John Bogovic edited this page Jul 9, 2021 · 11 revisions

N5 Metadata Dialects

This page contains a list and description of known n5 metadata dialects.

N5-viewer

COSEM

The COSEM metadata style is described here.

Dataset-level attributes

Datasets shall contain a transform field that describes how the discrete pixel grid should be arranged in physical space.

"transform": {
    "axes": [ ], 
    "units": [ ],
    "scale": [ ],
    "translate": [ ]
}

All fields below must have lengths equal to the dimensionality of the n5 dataset they describe.

  • axes: String[]
    • gives a label to axis indexes
    • examples: ["x","y","z"], ["z","y","x"]
  • units: String[]
    • the physical
    • examples ["nm","nm","nm"], ["microns","microns","microns"]
  • scale: number[]
    • physical scale factors (see physical spacing)
  • translate: number[]
    • physical translation (see physical spacing)

Physical spacing

Call the 0th, 1st, and 2nd dimensions of the dataset i, j, and k, respectively. Then if axis: ["x","y","z"], then The discrete point at (i,j,k), should be mapped to the physical point (x,y,z) as follows:

x = (scale[0] * i) + translate[0]
y = (scale[1] * j) + translate[1]
z = (scale[2] * k) + translate[2]