an array buffer of image data to load (there are also methods that abstract this more. See loadFromUrl, and loadFromFile)
a name for this image. Default is an empty string
a color map to use. default is gray
the opacity for this image. default is 1
Allows loading formats where header and image are separate files (e.g. nifti.hdr, nifti.img)
minimum intensity for color brightness/contrast
maximum intensity for color brightness/contrast
whether or not to trust cal_min and cal_max from the nifti header (trusting results in faster loading)
the percentile to use for setting the robust range of the display values (smart intensity setting for images with large ranges)
whether or not to ignore zero voxels in setting the robust range of display values
give precedence to QForm (Quaternion) or SForm (Matrix)
a color map to use for symmetrical negative intensities
volume displayed, 0 indexed, must be less than nFrame4D
FIXME the following params are documented but not included in the actual constructor
TODO
TODO
TODO
TODO
TODO
set contrast/brightness to robust range (2%..98%)
volume for estimate (use -1 to use estimate on all loaded volumes; use INFINITY for current volume)
if true (default) only center of volume used for estimate
Returns voxel intensity at specific native coordinates. Delegates to VolumeUtils.getValue.
Native X coordinate (0-indexed)
Native Y coordinate (0-indexed)
Native Z coordinate (0-indexed)
4D frame index (0-indexed)
Flag to read from imaginary data array
Scaled voxel intensity
read a 3D slab of voxels from a volume, specified in RAS coordinates. Delegates to VolumeUtils.getVolumeData.
first row, column and slice (RAS order) for selection
final row, column and slice (RAS order) for selection
array data type. Options: 'same' (default), 'uint8', 'float32', 'scaled', 'normalized', 'windowed'
the an array where ret[0] is the voxel values and ret[1] is dimension of selection
save image as NIfTI volume and trigger download. Delegates to ImageWriter.saveToDisk.
Filename for download. If empty, returns data without download.
Optional Uint8Array drawing overlay
Promise
Converts NVImage to NIfTI compliant byte array, potentially compressed. Delegates to ImageWriter.saveToUint8Array.
Filename (determines if compression is needed via .gz suffix)
Optional Uint8Array drawing overlay
Promise
write a 3D slab of voxels from a volume, specified in RAS coordinates. Delegates to VolumeUtils.setVolumeData. Input slabData is assumed to be in the correct raw data type for the target image.
first row, column and slice (RAS order) for selection
final row, column and slice (RAS order) for selection
array of voxel values to insert (RAS order, raw data type)
Static
createCreates a Uint8Array representing a NIFTI file (header + optional image data). Delegates to ImageWriter.createNiftiArray.
Static
createCreates a NIFTI1 header object with basic properties. Delegates to ImageWriter.createNiftiHeader.
Static
loadStatic
loadStatic
loadStatic
zerosa factory function to make a zero filled image given a NVImage as a reference
an existing NVImage as a reference
the output data type. Options: 'same', 'uint8'
new NVImage filled with zeros for the image data
a NVImage encapsulates some images data and provides methods to query and operate on images