example param src export const lookup1d = < T > ( src ) => ( i ) => src [ i ] ; remarks example param src param width export const lookup2d = < T > ( src , width ) => ( i ) => src [ i [ 0 ] + i [ 1 ] * width ] ; /**
 * Same as  lookup2d , but for 3D data. The index ordering of the
 * source data MUST be in Z, Y, X order (i.e. a stack of row major 2D slices).
 * No bounds checks are done.
 *
 *  param src param width param height export const lookup3d = < T > ( src , width , height ) => { const stridez = width * height ; return ( i ) => src [ i [ 0 ] + i [ 1 ] * width + i [ 2 ] * stridez ] ; } ;