Methods
_compareArrays(reference, target) → {boolean}
Compare 2 arrays.
2 null arrays return true.
Do no perform strict type checking.
Parameters:
Name | Type | Description |
---|---|---|
reference |
* | |
target |
* |
- Source:
Returns:
True if arrays are identicals. False if not.
- Type
- boolean
_frameToCanvas() → {Uint8Array}
Convert frame.pixelData to canvas.context.imageData.data
- Source:
Returns:
- Type
- Uint8Array
_pixelTo8Bit(value, params) → {Number}
Convert pixel value to 8 bit (canvas.context.imageData.data: maximum 8 bit per each of RGBA value)
Parameters:
Name | Type | Description |
---|---|---|
value |
Number | Pixel value |
params |
Object | {invert, min, mix, padding, range} |
- Source:
Returns:
- Type
- Number
cosines() → {array}
Generate X, y and Z cosines from image orientation
Returns default orientation if _imageOrientation was invalid.
- Source:
Returns:
Array[3] containing cosinesX, Y and Z.
- Type
- array
getImageDataUrl() → {String}
Get frame preview as data:URL
- Source:
Returns:
- Type
- String
getPixelData(column, row) → {*}
Get data value
Parameters:
Name | Type | Description |
---|---|---|
column |
* | |
row |
* |
- Source:
Returns:
- Type
- *
merge(frame) → {boolean}
Merge current frame with provided frame.
Frames can be merged (i.e. are identical) if following are equals:
- dimensionIndexValues
- imageOrientation
- imagePosition
- instanceNumber
- sopInstanceUID
Parameters:
Name | Type | Description |
---|---|---|
frame |
* |
- Source:
Returns:
True if frames could be merge. False if not.
- Type
- boolean
setPixelData(column, row, value) → {*}
Set data value
Parameters:
Name | Type | Description |
---|---|---|
column |
* | |
row |
* | |
value |
* |
- Source:
Returns:
- Type
- *
spacingXY() → {*}
Get x/y spacing of a frame.
- Source:
Returns:
- Type
- *
validate(model) → {*}
Validate the frame.
Parameters:
Name | Type | Description |
---|---|---|
model |
* |
- Source:
Returns:
- Type
- *