Image is the N-dimensional image data structure for itk-wasm.
imageType: The ImageType for this image.
name: An optional name, a
String, that describes this image.
origin: An Array with length dimension that describes the location of the center of the lower left pixel in physical units.
spacing: An Array with length dimension that describes the spacing between pixel in physical units.
direction: A dimension by dimension Float64Array in column-major order, that describes the orientation of the image at its origin. The orientation of each axis are the orthonormal columns.
size: An Array with length dimension that contains the number of pixels along dimension.
data: A TypedArray containing the pixel buffer data.
For more information, see the description of an
itk::Image in the ITK Software Guide.
Note that the
size are indexed with an
z convention ordering. This is the reverse indexing convention relative to other libraries such as TensorFlow.js. To generate a TensorFlow tensor from an
const tensor = tf.tensor(image.data, image.size.reverse())