Skip to content
RII-Mango edited this page Feb 22, 2016 · 2 revisions

nifti : * | Object

nifti

Kind: global variable

nifti.NIFTI1 : function

Kind: static class of nifti
Properties

Name Type Description
littleEndian boolean
dim_info number
dims Array.<number> image dimensions
intent_p1 number
intent_p2 number
intent_p3 number
intent_code number
datatypeCode number
numBitsPerVoxel number
slice_start number
slice_end number
slice_code number
pixDims Array.<number> voxel dimensions
vox_offset number
scl_slope number
scl_inter number
xyzt_units number
cal_max number
cal_min number
slice_duration number
toffset number
description string
aux_file string
intent_name string
qform_code number
sform_code number
quatern_b number
quatern_c number
quatern_d number
quatern_x number
quatern_y number
quatern_z number
affine Array.<Array.<number>>
magic string
isHDR boolean if hdr/img format
extensionFlag Array.<number>
extensionSize number
extensionCode number

new nifti.NIFTI1()

The NIFTI1 constructor.

niftI1.readHeader(data)

Reads the header data.

Kind: instance method of NIFTI1

Param Type
data ArrayBuffer

niftI1.toFormattedString() ⇒ string

Returns a formatted string of header fields.

Kind: instance method of NIFTI1

niftI1.getDatatypeCodeString(code) ⇒ string

Returns a human-readable string of datatype.

Kind: instance method of NIFTI1

Param Type
code number

niftI1.getTransformCodeString(code) ⇒ string

Returns a human-readable string of transform type.

Kind: instance method of NIFTI1

Param Type
code number

niftI1.getUnitsCodeString(code) ⇒ string

Returns a human-readable string of spatial and temporal units.

Kind: instance method of NIFTI1

Param Type
code number

niftI1.getQformMat() ⇒ Array.<Array.<number>>

Returns the qform matrix.

Kind: instance method of NIFTI1

niftI1.convertNiftiQFormToNiftiSForm(qb, qc, qd, qx, qy, qz, dx, dy, dz, qfac) ⇒ Array.<Array.<number>>

Converts qform to an affine. (See http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1_io.c)

Kind: instance method of NIFTI1

Param Type
qb number
qc number
qd number
qx number
qy number
qz number
dx number
dy number
dz number
qfac number

niftI1.convertNiftiSFormToNEMA(R) ⇒ string

Converts sform to an orientation string (e.g., XYZ+--). (See http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1_io.c)

Kind: instance method of NIFTI1

Param Type
R Array.<Array.<number>>

niftI1.getExtensionLocation() ⇒ number

Returns the byte index of the extension.

Kind: instance method of NIFTI1

niftI1.getExtensionSize(data) ⇒ number

Returns the extension size.

Kind: instance method of NIFTI1

Param Type
data DataView

niftI1.getExtensionCode(data) ⇒ number

Returns the extension code.

Kind: instance method of NIFTI1

Param Type
data DataView

nifti.NIFTI2 : function

Kind: static class of nifti
Properties

Name Type Description
littleEndian boolean
dim_info number
dims Array.<number> image dimensions
intent_p1 number
intent_p2 number
intent_p3 number
intent_code number
datatypeCode number
numBitsPerVoxel number
slice_start number
slice_end number
slice_code number
pixDims Array.<number> voxel dimensions
vox_offset number
scl_slope number
scl_inter number
xyzt_units number
cal_max number
cal_min number
slice_duration number
toffset number
description string
aux_file string
intent_name string
qform_code number
sform_code number
quatern_b number
quatern_c number
quatern_d number
quatern_x number
quatern_y number
quatern_z number
affine Array.<Array.<number>>
magic string
extensionFlag Array.<number>

new nifti.NIFTI2()

The NIFTI2 constructor.

niftI2.getExtensionSize ⇒ number

Returns the extension size.

Kind: instance property of NIFTI2

Param Type
data DataView

niftI2.getExtensionCode ⇒ number

Returns the extension code.

Kind: instance property of NIFTI2

Param Type
data DataView

niftI2.getDatatypeCodeString ⇒ string

Returns a human-readable string of datatype.

Kind: instance property of NIFTI2

Param Type
code number

niftI2.getTransformCodeString ⇒ string

Returns a human-readable string of transform type.

Kind: instance property of NIFTI2

Param Type
code number

niftI2.getUnitsCodeString ⇒ string

Returns a human-readable string of spatial and temporal units.

Kind: instance property of NIFTI2

Param Type
code number

niftI2.getQformMat ⇒ Array.<Array.<number>>

Returns the qform matrix.

Kind: instance property of NIFTI2

niftI2.convertNiftiQFormToNiftiSForm ⇒ Array.<Array.<number>>

Converts qform to an affine. (See http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1_io.c)

Kind: instance property of NIFTI2

Param Type
qb number
qc number
qd number
qx number
qy number
qz number
dx number
dy number
dz number
qfac number

niftI2.convertNiftiSFormToNEMA ⇒ string

Converts sform to an orientation string (e.g., XYZ+--). (See http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1_io.c)

Kind: instance property of NIFTI2

Param Type
R Array.<Array.<number>>

niftI2.readHeader(data)

Reads the header data.

Kind: instance method of NIFTI2

Param Type
data ArrayBuffer

niftI2.toFormattedString() ⇒ string

Returns a formatted string of header fields.

Kind: instance method of NIFTI2

niftI2.getExtensionLocation() ⇒ number

Returns the byte index of the extension.

Kind: instance method of NIFTI2

nifti.isNIFTI1(data) ⇒ boolean

Returns true if this data represents a NIFTI-1 header.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.isNIFTI2(data) ⇒ boolean

Returns true if this data represents a NIFTI-2 header.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.isNIFTI(data) ⇒ boolean

Returns true if this data represents a NIFTI header.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.isCompressed(data) ⇒ boolean

Returns true if this data is GZIP compressed.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.decompress(data) ⇒ ArrayBuffer

Returns decompressed data.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.readHeader(data) ⇒ NIFTI1 | NIFTI2 | null

Reads and returns the header object.

Kind: static method of nifti

Param Type
data ArrayBuffer

nifti.hasExtension(header) ⇒ boolean

Returns true if this header contains an extension.

Kind: static method of nifti

Param Type
header NIFTI1 | NIFTI2

nifti.readImage(header, data) ⇒ ArrayBuffer

Returns the image data.

Kind: static method of nifti

Param Type
header NIFTI1 | NIFTI2
data ArrayBuffer

nifti.readExtension(header, data) ⇒ ArrayBuffer

Returns the extension data (including extension header).

Kind: static method of nifti

Param Type
header NIFTI1 | NIFTI2
data ArrayBuffer

nifti.readExtensionData(header, data) ⇒ ArrayBuffer

Returns the extension data.

Kind: static method of nifti

Param Type
header NIFTI1 | NIFTI2
data ArrayBuffer
Clone this wiki locally