Members
(constant) DRAW_DEBUG
Draw Debug flag.
- Source
(constant) DcmCodes
DICOM codes. List: https://dicom.nema.org/medical/dicom/2022a/output/chtml/part16/chapter_d.html.
- Source
(constant) GraphicTypes
DICOM graphic types.
(constant) InteractionEventNames
List of interaction event names.
- Source
(constant) Orientation
Default anatomical plane orientations.
- Source
(constant) QuantificationName2DictItem
Quantification name to dictionary item.
- Source
(constant) QuantificationUnit2UcumKey
Quantification unit to UCUM key. Associated tags:
- Source
(constant) RelationshipTypes
DICOM relationship types.
(constant) RequiredDicomSegTags
List of DICOM Seg required tags.
- Source
(constant) SctCodes
SNOMED-CT codes. List: https://browser.ihtsdotools.org.
- Source
(constant) TagKeys
DICOM code tag keys.
- Source
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Small list of used tag keys.
- Source
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
- Source
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Related DICOM tag keys.
(constant) TagKeys
Small list of used tag keys.
- Source
(constant) UcumCodes
UCUM codes. Definition: https://unitsofmeasure.org/ucum. List: https://ucum.nlm.nih.gov/ucum-lhc/demo.html.
- Source
(constant) ValueTypeValueTagName
DICOM value type to associated tag name.
(constant) ValueTypes
DICOM value types.
Ref: https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.17.3.2.html#sect_C.17.3.2.1.
(constant) binderList
List of binders.
- Source
(constant) customUI
Overridalbe custom UI object for client defined UI.
- Source
(constant) d65
CIE Standard Illuminant D65, standard 2° observer.
- Source
(constant) decoderScripts
Decoder scripts to be passed to web workers for image decoding.
- Source
(constant) defaultPresets :Object.<string, Object.<string, WindowLevel>>
List of default window level presets.
- Object.<string, Object.<string, WindowLevel>>
- Source
(constant) defaultToolList :Object.<string, any>
Default tool list.
- Object.<string, any>
- Source
(constant) defaultToolOptions :Object.<string, Object.<string, any>>
Default tool options.
- Object.<string, Object.<string, any>>
- Source
(constant) dictionary :Object.<string, Object.<string, Array.<string>>>
DICOM tag dictionary 2022a. Generated using xml standard conversion from https://github.com/ivmartel/dcmStdToJs v0.1.0.
Conversion changes:
- (vr) 'See Note' -> 'NONE',
- (vr) 'OB or OW' -> 'ox',
- (vr) 'US or SS' -> 'xs',
- (vr) 'US or OW' -> 'xx',
- (vr) 'US or SS or OW' -> 'xs',
- added 'GenericGroupLength' element to each group.
Local changes:
- tag numbers with 'xx' were replaced with '00', 'xxx' with '001' and 'xxxx' with '0004'.
- Object.<string, Object.<string, Array.<string>>>
- Source
(constant) i18n
Namespace for translation function (in a namespace to allow for override from client).
- Source
(constant) lut_range_max
Lookup tables for image colour display.
- Source
(constant) luts :Object.<string, ColourMap>
List of available lookup tables (lut).
- Object.<string, ColourMap>
- Source
(constant) minWindowWidth
Minimum window width value.
Ref: http://dicom.nema.org/medical/dicom/2022a/output/chtml/part03/sect_C.11.2.html#sect_C.11.2.1.2.
- Source
(constant) tagGroups :Object.<string, string>
Tag groups: key to name pairs. Copied from gdcm-2.6.1\Source\DataDictionary\GroupName.dic -> removed duplicates (commented).
- Object.<string, string>
- Source
(constant) toolList :Object.<string, any>
List of client provided tools to be added to the default ones.
- Object.<string, any>
- Source
// custom tool
class AlertTool {
mousedown() {alert('AlertTool mousedown');}
init() {}
activate() {}
}
// pass it to dwv tool list
dwv.toolList['Alert'] = AlertTool;
// create the dwv app
const app = new dwv.App();
// initialise
const viewConfig0 = new dwv.ViewConfig('layerGroup0');
const viewConfigs = {'*': [viewConfig0]};
const options = new dwv.AppOptions(viewConfigs);
options.tools = {Alert: {}};
app.init(options);
// activate tool
app.addEventListener('load', function () {
app.setTool('Alert');
});
// load dicom data
app.loadURLs([
'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
]);
(constant) toolOptions :Object.<string, Object.<string, any>>
List of client provided tool options to be added to the default ones.
- Object.<string, Object.<string, any>>
- Source
// custom factory
class LoveFactory {
getName() {return 'love';}
static supports(mathShape) {return mathShape instanceof ROI;}
getNPoints() {return 1;}
getTimeout() {return 0;}
setAnnotationMathShape(annotation, points) {
const px = points[0].getX();
const py = points[0].getY();
annotation.mathShape = new dwv.ROI([
new dwv.Point2D(px+15,py), new dwv.Point2D(px+10,py-10),
new dwv.Point2D(px,py), new dwv.Point2D(px-10,py-10),
new dwv.Point2D(px-15,py), new dwv.Point2D(px,py+20)
]);
annotation.getFactory = function () {return new LoveFactory();}
}
createShapeGroup(annotation, style) {
const roi = annotation.mathShape;
// konva line
const arr = [];
for (let i = 0; i < roi.getLength(); ++i) {
arr.push(roi.getPoint(i).getX());
arr.push(roi.getPoint(i).getY());
}
const shape = new Konva.Line({
name: 'shape', points: arr,
stroke: 'red', strokeWidth: 2,
closed: true
});
// konva group
const group = new Konva.Group();
group.name('love-group');
group.visible(true);
group.id(annotation.id);
group.add(shape);
return group;
}
}
// pass it to dwv option list
dwv.toolOptions['draw'] = {LoveFactory};
// create the dwv app
const app = new dwv.App();
// initialise
const viewConfig0 = new dwv.ViewConfig('layerGroup0');
const viewConfigs = {'*': [viewConfig0]};
const options = new dwv.AppOptions(viewConfigs);
options.tools = {Draw: {options: ['Love']}};
app.init(options);
// activate tool
app.addEventListener('load', function () {
app.setTool('Draw');
app.setToolFeatures({shapeName: 'Love'});
});
// load dicom data
app.loadURLs([
'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323851.dcm'
]);
(constant) transferSyntaxKeywords :Object.<string, string>
Transfer syntaxes indexed by keyword.
- Object.<string, string>
- Source
(constant) transferSyntaxes :Object.<string, string>
Transfer syntaxes.
See https://dicom.nema.org/medical/dicom/2022a/output/chtml/part06/chapter_A.html#table_A-1.
- Object.<string, string>
- Source
(constant) viewEventNames :Array.<string>
List of view event names.
- Array.<string>
- Source
(constant) vr32bitVL :Object.<string, boolean>
List of Value Representation (VR) with 32bit Value Length (VL).
Added locally used 'ox'. See http://dicom.nema.org/medical/dicom/2022a/output/chtml/part05/chapter_7.html#table_7.1-1.
- Object.<string, boolean>
- Source
(constant) vrCharSetString :Object.<string, boolean>
List of string VR with extended or replaced default character repertoire defined in Specific Character Set (0008,0005).
See https://dicom.nema.org/medical/dicom/2022a/output/chtml/part05/chapter_6.html#sect_6.1.2.2.
- Object.<string, boolean>
- Source
(constant) vrTypes :Object.<string, string>
VR equivalent javascript types.
See https://dicom.nema.org/medical/dicom/2022a/output/chtml/part05/sect_6.2.html#table_6.2-1.
- Object.<string, string>
- Source
(constant) writerActions :Object.<string, function()>
Possible writer actions.
- Object.<string, function()>
- Source
Methods
addLayerGroup(id)
Append a layer div in the root 'dwv' one.
Name | Type | Description |
---|---|---|
id | string | The id of the layer. |
- Source
addLayerGroups(number)
Add Layer Groups.
Name | Type | Description |
---|---|---|
number | number | The number of layer groups. |
- Source
addTagsToDictionary(group, tags)
Add tags to the dictionary.
Name | Type | Description |
---|---|---|
group | string | The group key. |
tags | Object.<string, Array.<string>> | The tags to add as an object indexed by element key with values as: [VR, multiplicity, TagName] (all strings). |
- Source
areOrthogonal(line0, line1) → {boolean}
Check if two lines are orthogonal.
- Source
True if both lines are orthogonal.
- Type:
- boolean
arrayContains(arr0, arr1) → {boolean}
Check if the first input array contains all the elements of the second input array.
Name | Type | Description |
---|---|---|
arr0 | Array.<string> | The test array. |
arr1 | Array.<string> | The elements to check in the first array. |
- Source
True if all the elements of arr1 are included in arr0.
- Type:
- boolean
arrayEquals(arr0, arr1) → {boolean}
Check for array equality.
Name | Type | Description |
---|---|---|
arr0 | Array | First array. |
arr1 | Array | Second array. |
- Source
True if both array are defined and contain same values.
- Type:
- boolean
arraySortEquals(arr0, arr1) → {boolean}
Check for array equality after sorting.
Name | Type | Description |
---|---|---|
arr0 | Array | First array. |
arr1 | Array | Second array. |
- Source
True if both array are defined and contain same values.
- Type:
- boolean
b64urlToArrayBuffer(str) → {ArrayBuffer}
Convert a base64 url to an ArrayBuffer. Something like: 'data:application/dicom;base64,SGVsbG8sIFdvcmxkIQ==' The function is independent from the mime type.
Name | Type | Description |
---|---|---|
str | string | Base64 url string. |
- Source
The corresponding buffer.
- Type:
- ArrayBuffer
boundNodePosition(node, min, max) → {boolean}
Bound a node position.
Name | Type | Description |
---|---|---|
node | Konva. | The node to bound the position. |
min | Point2D | The minimum position. |
max | Point2D | The maximum position. |
- Source
True if the position was corrected.
- Type:
- boolean
buildLut(func) → {Array.<number>}
Build a LUT of size lut_range_max.
Name | Type | Description |
---|---|---|
func | function | The i to lut function. |
- Source
The LUT.
- Type:
- Array.<number>
buildMultipart(parts, boundary) → {Uint8Array}
Build a multipart message.
Ref:
Name | Type | Description |
---|---|---|
parts | Array | The message parts as an array of object containing content headers and messages as the data property (as returned by parse). |
boundary | string | The message boundary. |
- Source
The full multipart message.
- Type:
- Uint8Array
canCreateCanvas(width, height) → {boolean}
Test if a canvas with the input size can be created.
Ref:
Name | Type | Description |
---|---|---|
width | number | The canvas width. |
height | number | The canvas height. |
- Source
True is the canvas can be created.
- Type:
- boolean
capitaliseFirstLetter(string) → {string}
Capitalise the first letter of a string.
Name | Type | Description |
---|---|---|
string | string | The string to capitalise the first letter. |
- Source
The new string.
- Type:
- string
checkAndFixUnknownVR(element, isLittleEndianopt)
Fix for broken DICOM elements: replace "UN" with correct VR if the element exists in dictionary.
Name | Type | Attributes | Description |
---|---|---|---|
element | DataElement | The DICOM element. | |
isLittleEndian | boolean | <optional> | Flag to tell if the data is little or big endian (default: true). |
checkIterator(assert, getIter, theoValues, name)
Check iter.
Name | Type | Description |
---|---|---|
assert | object | The qunit assert. |
getIter | function | Function to get the iter at a given position. |
theoValues | Array | Theoretical values. |
name | string | String to identify test. |
checkLoad(assert, id, data, nData, nDataOk)
Check the events of memory load.
Name | Type | Description |
---|---|---|
assert | object | The Qunit assert object. |
id | string | An id for the test. |
data | Array | The data to load as a string array. |
nData | number | The theoretical number of data. |
nDataOk | number | The theoretical number of data with no error. |
checkResponseEvent(event, reqName) → {boolean}
Check a response event and print error if any.
Name | Type | Description |
---|---|---|
event | object | The load event. |
reqName | string | The request name. |
- Source
True if response is ok.
- Type:
- boolean
checkSelected(parser) → {boolean}
Check if a parser is checked.
Name | Type | Description |
---|---|---|
parser | object | The parser to check. |
- Source
True isf selected.
- Type:
- boolean
checkTag(element, name, valuesopt) → {string}
Check an input tag.
Name | Type | Attributes | Description |
---|---|---|---|
element | object | The element to check. | |
name | string | The element name. | |
values | Array | <optional> | The expected values. |
A warning if the element is not as expected.
- Type:
- string
checkTag(dataElements, tagDefinition)
Check that a DICOM tag definition is present in a parsed element.
Name | Type | Description |
---|---|---|
dataElements | DataElements | The root dicom element. |
tagDefinition | object | The tag definition as {name, tag, type, enum}. |
- Source
checkTags(tags, requiredTags, withLog) → {boolean}
Check a list of input tags against a required list.
Name | Type | Description |
---|---|---|
tags | object | The tags to check. |
requiredTags | Array | Array of tag names. |
withLog | boolean | Flag to log errors or not. |
True if all required tags are present in the input.
- Type:
- boolean
cielabToCiexyz(triplet) → {Scalar3D}
Convert CIE LAB to CIE XYZ (standard illuminant D65, 2degree 1931).
Ref: https://en.wikipedia.org/wiki/CIELAB_color_space#From_CIELAB_to_CIEXYZ.
Name | Type | Description |
---|---|---|
triplet | object | CIE LAB triplet as {l,a,b}. |
- Source
CIE XYZ triplet as {x,y,z}.
- Type:
- Scalar3D
cielabToSrgb(triplet) → {RGB}
Convert CIE LAB to sRGB (standard illuminant D65).
Name | Type | Description |
---|---|---|
triplet | object | CIE LAB triplet as {l,a,b}. |
- Source
'sRGB' triplet as {r,g,b}.
- Type:
- RGB
ciexyzToCielab(triplet) → {object}
Convert CIE XYZ to CIE LAB (standard illuminant D65, 2degree 1931).
Ref: https://en.wikipedia.org/wiki/CIELAB_color_space#From_CIEXYZ_to_CIELAB.
Name | Type | Description |
---|---|---|
triplet | Scalar3D | CIE XYZ triplet as {x,y,z}. |
- Source
CIE LAB triplet as {l,a,b}.
- Type:
- object
ciexyzToSrgb(triplet) → {RGB}
Convert CIE XYZ to sRGB.
Ref: https://en.wikipedia.org/wiki/SRGB#From_CIE_XYZ_to_sRGB.
Name | Type | Description |
---|---|---|
triplet | Scalar3D | CIE XYZ triplet as {x,y,z}. |
- Source
'sRGB' triplet as {r,g,b}.
- Type:
- RGB
cleanString(inputStr) → {string}
Clean string: remove zero-width space ending and trim. Warning: no tests are done on the input, will fail if null or undefined or not string. Exported for tests only.
Name | Type | Description |
---|---|---|
inputStr | string | The string to clean. |
- Source
The cleaned string.
- Type:
- string
colourNameToHex(name) → {string}
Get the hex code of a string colour for a colour used in pre dwv v0.17.
Name | Type | Description |
---|---|---|
name | string | The name of a colour. |
- Source
The hex representing the colour.
- Type:
- string
colourRange(colours, end) → {object}
Get a colour iterator. The input array defines the colours and their start index.
Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
Name | Type | Description |
---|---|---|
colours | Array | An array of {index, colour} pairs. |
end | number | The end of the range (excluded). |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
compare(jsonTags, dicomElements, name, comparator)
Compare JSON tags and DICOM elements.
Name | Type | Description |
---|---|---|
jsonTags | object | The JSON tags. |
dicomElements | object | The DICOM elements. |
name | string | The name of the test. |
comparator | object | An object with an equal function (such as Qunit assert). |
compareImageAndBuffer(image, size, buffer, rsi) → {object}
Compare an image and a buffer.
Name | Type | Description |
---|---|---|
image | object | The input image. |
size | object | The size of the input buffer. |
buffer | Array | The input buffer. |
rsi | object | The rescale slope of the input buffer. |
- Source
Statistics of the value and rescaled value differences.
- Type:
- object
comparePosPat(a, b) → {number}
Compare two pos pat keys.
Name | Type | Description |
---|---|---|
a | string | The key of the first item. |
b | string | The key of the second item. |
- Source
Negative if a<b, positive if a>b.
- Type:
- number
computeGradX(greyscale) → {Array}
Compute the X gradient.
Name | Type | Description |
---|---|---|
greyscale | object | The values. |
- Source
The gradient.
- Type:
- Array
computeGradY(greyscale) → {Array}
Compute the Y gradient.
Name | Type | Description |
---|---|---|
greyscale | object | The values. |
- Source
The gradient.
- Type:
- Array
computeGradient(greyscale) → {object}
Compute gradient.
Name | Type | Description |
---|---|---|
greyscale | object | The input greyscale. |
- Source
A gradient object.
- Type:
- object
computeGreyscale(data, width, height) → {object}
Compute grey scale.
Name | Type | Description |
---|---|---|
data | Array | The input data. |
width | number | The width of the output. |
height | number | The height of the output. |
- Source
A greyscale object.
- Type:
- object
computeLaplace(greyscale) → {object}
Name | Type | Description |
---|---|---|
greyscale | object | The input greyscale. |
- Source
A laplace object.
- Type:
- object
computeSides(dist, gradX, gradY, greyscale) → {object}
Compute the sides.
Name | Type | Description |
---|---|---|
dist | number | The distance. |
gradX | Array | The X gradient. |
gradY | Array | The Y gradient. |
greyscale | object | The value. |
- Source
The sides.
- Type:
- object
createAndPutHtml(data, id)
Create and append html.
Name | Type | Description |
---|---|---|
data | object | Data configuration object. |
id | string | The html list element. |
- Source
createDefaultReplaceFormat(length) → {string}
Create a default replace format from a given length. For example: '{v0}, {v1}'.
Name | Type | Description |
---|---|---|
length | number | The length of the format. |
- Source
A replace format.
- Type:
- string
createImage(elements) → {Image}
Create an Image from DICOM elements.
Name | Type | Description |
---|---|---|
elements | Object.<string, DataElement> | The DICOM elements. |
- Source
The Image object.
- Type:
- Image
createImage(colourMapName, colourMap)
Create the colour map image and add it to the document.
Name | Type | Description |
---|---|---|
colourMapName | string | The colour map name. |
colourMap | object | The colour map values. |
createMaskImage(elements) → {Image}
Create a mask Image from DICOM elements.
Name | Type | Description |
---|---|---|
elements | Object.<string, DataElement> | The DICOM elements. |
- Source
The mask Image object.
- Type:
- Image
createOverlayData(dicomElements, configs) → {Array}
Create overlay data array for a DICOM image.
Name | Type | Description |
---|---|---|
dicomElements | object | DICOM elements of the image. |
configs | object | The overlay data configs. |
- Source
Overlay data array.
- Type:
- Array
createOverlayDataForDom(info, configs) → {Array}
Create overlay data array for a DOM image.
Name | Type | Description |
---|---|---|
info | object | Meta data. |
configs | object | The overlay data configs. |
- Source
Overlay data array.
- Type:
- Array
createRoiBuffers(image, segments) → {object}
Create ROI buffers.
Name | Type | Description |
---|---|---|
image | Image | The mask image. |
segments | Array.<MaskSegment> | The mask segments. |
- Source
The ROI buffers.
- Type:
- object
createRoiSliceBuffers(image, segments, sliceOffset) → {object}
Create ROI slice buffers.
Name | Type | Description |
---|---|---|
image | Image | The mask image. |
segments | Array.<MaskSegment> | The mask segments. |
sliceOffset | number | The slice offset. |
- Source
The ROI slice image buffers.
- Type:
- object
createView(elements, image) → {View}
Create a View from DICOM elements and image.
Name | Type | Description |
---|---|---|
elements | Object.<string, DataElement> | The DICOM elements. |
image | Image | The associated image. |
- Source
The View object.
- Type:
- View
dateToDateObj(date) → {Object}
Extract date values from a Date object.
Name | Type | Description |
---|---|---|
date | Date | The input date. |
- Source
A 'date' object.
- Type:
- Object
dateToTimeObj(date) → {Object}
Extract time values from a Date object.
Name | Type | Description |
---|---|---|
date | Date | The input date. |
- Source
A 'time' object.
- Type:
- Object
dcmdump(dicomElements) → {string}
Dump the DICOM tags to a string in the same way as the DCMTK dcmdump
command (https://support.dcmtk.org/docs-dcmrt/dcmdump.html).
Name | Type | Description |
---|---|---|
dicomElements | Object.<string, DataElement> | The dicom elements. |
The dumped file.
- Type:
- string
decodeKeyValueUri(uri, replaceMode) → {Array.<string>}
Decode a Key/Value pair URI. If a key is repeated, the result be an array of base + each key.
Name | Type | Description |
---|---|---|
uri | string | The URI to decode. |
replaceMode | string | The key replace mode. Can be:
|
- Source
The list of input file urls.
- Type:
- Array.<string>
decodeManifest(manifest, nslices) → {Array.<string>}
Decode an XML manifest.
Name | Type | Description |
---|---|---|
manifest | object | The manifest to decode. |
nslices | number | The number of slices to load. |
- Source
The decoded manifest.
- Type:
- Array.<string>
decodeQuery(query, callback, options)
Generic URI query decoder. Supports manifest: [dwv root]?input=encodeURIComponent('[manifest file]')&type=manifest
. Or encoded URI with base and key value/pairs: [dwv root]?input=encodeURIComponent([root]?key0=value0&key1=value1)
.
Name | Type | Description |
---|---|---|
query | object | The query part to the input URI. |
callback | function | The function to call with the decoded file urls. |
options | object | Optional url request options. |
- Source
endsWith(str, search) → {boolean}
Check if a string ends with the input element.
Name | Type | Description |
---|---|---|
str | string | The input string. |
search | string | The searched ending. |
- Source
True if the input string ends with the searched string.
- Type:
- boolean
equalPosPat(pos1, pos2) → {boolean}
Check two position patients for equality.
Name | Type | Description |
---|---|---|
pos1 | * | The first position patient. |
pos2 | * | The second position patient. |
- Source
True is equal.
- Type:
- boolean
fileCheckTags(tags, image) → {boolean}
Check tags are coherent with image size.
Name | Type | Description |
---|---|---|
tags | object | The tags to check. |
image | object | The associated image. |
True if the tags are ok.
- Type:
- boolean
fillGithubHostedWithExample(base, files)
Fill github hosted inputs with preset strings.
Name | Type | Description |
---|---|---|
base | string | The base url href. |
files | string | The coma separated list of files. |
- Source
findInArraySubset(arr, callbackFn, start, endopt) → {number|undefined}
Array find in a subset of the input array. Equivalent to: arr.slice(start, end).find(callbackFn)
.
Name | Type | Attributes | Description |
---|---|---|---|
arr | Uint8Array | The input array to search. | |
callbackFn | function | The find function. | |
start | number | | The array start index. | |
end | number | | <optional> | The array end index. |
- Source
The index where the element was found.
- Type:
- number |
undefined
flattenArrayOfTypedArrays(initialArray) → {object}
Helper method to flatten an array of typed arrays to 2D typed array.
Name | Type | Description |
---|---|---|
initialArray | Array | Array of typed arrays. |
- Source
A typed array containing all values.
- Type:
- object
flipArrayEndianness(array)
Flip an array's endianness. Inspired from DataStream.js.
Name | Type | Description |
---|---|---|
array | object | The array to flip (modified). |
- Source
gaussianBlur(buffer, out)
Gaussian blur an input buffer.
Name | Type | Description |
---|---|---|
buffer | Array | The input buffer. |
out | Array | The result. |
- Source
generate()
Generate DICOM data.
generateBinary(tags) → {object}
Simple BinaryPixGenerator.
Name | Type | Description |
---|---|---|
tags | object | The input tags. |
The pixel buffer.
- Type:
- object
generateGradSquare(tags) → {object}
Simple GradSquarePixGenerator.
Name | Type | Description |
---|---|---|
tags | object | The input tags. |
The pixel buffer.
- Type:
- object
generateImageDataMonochrome(array, iterator, alphaFunc, windowLut, colourMap)
Generate image data for 'MONOCHROME*' photometric interpretation.
Name | Type | Description |
---|---|---|
array | ImageData | The array to store the outut data. |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
windowLut | WindowLut | The window/level LUT. |
colourMap | ColourMap | The colour map. |
generateImageDataPaletteColor(array, iterator, alphaFunc, colourMap, is16BitsStored)
Generate image data for 'PALETTE COLOR' photometric interpretation.
Name | Type | Description |
---|---|---|
array | ImageData | The array to store the outut data. |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
colourMap | ColourMap | The colour map. |
is16BitsStored | boolean | Flag to know if the data is 16bits. |
generateImageDataRgb(array, iterator, alphaFunc)
Generate image data for 'RGB' photometric interpretation.
Name | Type | Description |
---|---|---|
array | ImageData | The array to store the outut data. |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
- Source
generateImageDataYbrFull(array, iterator, alphaFunc)
Generate image data for 'YBR_FULL' photometric interpretation.
Name | Type | Description |
---|---|---|
array | ImageData | The array to store the outut data. |
iterator | object | Position iterator. |
alphaFunc | function | The alpha function. |
- Source
generateSlice(pixelGeneratorName, sliceNumber) → {Blob}
Name | Type | Description |
---|---|---|
pixelGeneratorName | string | The name of the pixel generator. |
sliceNumber | number | The slice to generate. |
A blob with the slice DICOM data.
- Type:
- Blob
getAnchorIndex(id) → {number}
Get an anchor index from its id.
Name | Type | Description |
---|---|---|
id | string | The anchor id as 'anchor#'. |
- Source
The anchor index.
- Type:
- number
getAnchorShape(group, index) → {Konva.Ellipse|undefined}
Get a Konva.Ellipse anchor shape from a group.
Name | Type | Description |
---|---|---|
group | Konva. | The group to look into. |
index | number | The anchor index. |
- Source
The anchor shape.
- Type:
- Konva.
Ellipse |undefined
getAngle(line0, line1) → {number}
Get the angle between two lines in degree.
- Source
The angle.
- Type:
- number
getAnnotationDivId(annotation, dataId) → {string}
Get the annotation divId.
Name | Type | Description |
---|---|---|
annotation | Annotation | The annotation. |
dataId | string | The data ID. |
The divId.
- Type:
- string
getAnnotationGroupDivId(dataId) → {string}
Get the annotation group divId.
Name | Type | Description |
---|---|---|
dataId | string | The data ID. |
The divId.
- Type:
- string
getAppViewConfig(dataId) → {object}
Get the first view config for a data id.
Name | Type | Description |
---|---|---|
dataId | string | The data id. |
- Source
The view config.
- Type:
- object
getAppViewConfigOrientation(divId) → {object}
Get the orientation of the first view config for a div id.
Name | Type | Description |
---|---|---|
divId | string | The div id. |
- Source
The orientation.
- Type:
- object
getArrayFromStringId(inputStr) → {Array}
Get an array from an id string in the form of: '#0-1_#1-2' (result of toStringId).
Name | Type | Description |
---|---|---|
inputStr | string | The input string. |
- Source
The corresponding array (minimum size is 3D).
- Type:
- Array
getBasicStats(values) → {Statistics}
Get simple stats: minimum, maximum, mean and standard deviation of an array of values.
Name | Type | Description |
---|---|---|
values | Array.<number> | The array of values to extract stats from. |
- Source
Simple statistics (no median, p25 nor p75).
- Type:
- Statistics
getBasicStats(array) → {object}
Get basic stats for an array.
Name | Type | Description |
---|---|---|
array | Array | Input array. |
Min, max, mean and standard deviation.
- Type:
- object
getBpeForVrType(vrType) → {number}
Get the number of bytes per element for a given VR type.
Name | Type | Description |
---|---|---|
vrType | string | The VR type as defined in the dictionary. |
The bytes per element.
- Type:
- number
getBrightness(rgb) → {number}
Get the brightness of a RGB colour: calculates the luma (Y) of the YIQ colour space.
Name | Type | Description |
---|---|---|
rgb | RGB | RGB triplet. |
- Source
The brightness ([0,1]).
- Type:
- number
getCode(dataElements) → {DicomCode}
Get a code object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
- Source
A code object.
- Type:
- DicomCode
getCodeFromSimpleDicom(simpleElements) → {DicomCode}
Get a dicom code from simple dicom elements.
Name | Type | Description |
---|---|---|
simpleElements | Object.<string, DataElement> | DICOM simple elements. |
The corresponding DICOM code.
- Type:
- DicomCode
getColourCode() → {DicomCode}
Get a colour DICOM code.
- Source
The code.
- Type:
- DicomCode
getCommonPrefix(values) → {string|undefined}
Get a common prefix from a list of strings.
Name | Type | Description |
---|---|---|
values | Array.<string> | The values to extract the prefix from. |
- Source
The common prefix.
- Type:
- string |
undefined
getComparePosPat(orientation) → {compareFn}
Get a position patient compare function accroding to an input orientation.
Name | Type | Description |
---|---|---|
orientation | Matrix33 | The orientation matrix. |
- Source
The position compare function.
- Type:
- compareFn
getConceptNameCode(name) → {DicomCode|undefined}
Get a concept name DICOM code.
Name | Type | Description |
---|---|---|
name | string | The measurment name as defined in a quantification object. |
- Source
The code.
- Type:
- DicomCode |
undefined
getConfigsHtmlList(configs) → {object}
Create list from configs.
Name | Type | Description |
---|---|---|
configs | Array | An array of data cofiguration. |
The html list element.
- Type:
- object
getCoronalMat33() → {Matrix33}
Create a 3x3 coronal (xzy) matrix.
- Source
The coronal matrix.
- Type:
- Matrix33
getCosinesFromOrientation(matrix) → {Array.<number>}
Get the direction cosines from an orientation matrix.
Name | Type | Description |
---|---|---|
matrix | Matrix33 | The input matrix. |
- Source
The image orientation patient cosines (6 values).
- Type:
- Array.<number>
getData() → {Array}
Get the selected data.
- Source
The selected data.
- Type:
- Array
getDataElement(tagName) → {DataElement}
Get a DICOM element from its tag name (value set separatly).
Name | Type | Description |
---|---|---|
tagName | string | The string tag name. |
The DICOM element.
- Type:
- DataElement
getDataElementPrefixByteSize(vr, isImplicit) → {number}
Get the number of bytes occupied by a data element prefix, (without its value).
WARNING: this is valid for tags with a VR, if not sure use the 'isTagWithVR' function first.
Reference:
| Tag | VR | VL | Value |
| 4 | 2 | 2 | X | -> regular explicit: 8 + X
| 4 | 2+2 | 4 | X | -> 32bit VL: 12 + X
| Tag | VL | Value |
| 4 | 4 | X | -> implicit (32bit VL): 8 + X
| Tag | Len | Value |
| 4 | 4 | X | -> item: 8 + X
Name | Type | Description |
---|---|---|
vr | string | The Value Representation of the element. |
isImplicit | boolean | Does the data use implicit VR? |
- Source
The size of the element prefix.
- Type:
- number
getDate(element) → {Object|undefined}
Get a 'date' object with {year, monthIndex, day} ready for the Date constructor from a DICOM element with vr=DA.
Name | Type | Description |
---|---|---|
element | DataElement | The DICOM element with date information. |
- Source
The 'date' object.
- Type:
- Object |
undefined
getDateTime(element) → {Object|undefined}
Get a 'dateTime' object with {date, time} ready for the Date constructor from a DICOM element with vr=DT.
Name | Type | Description |
---|---|---|
element | DataElement | The DICOM element with date-time information. |
- Source
The time object.
- Type:
- Object |
undefined
getDeOrientedArray3D(array3D, orientation) → {Array.<number>}
Get the raw values of an oriented input 3D array.
Name | Type | Description |
---|---|---|
array3D | Array.<number> | The 3D array. |
orientation | Matrix33 | The orientation 3D matrix. |
- Source
The values reordered to compensate the orientation.
- Type:
- Array.<number>
getDecayedDose(elements) → {object}
Get the decayed dose (Bq).
Name | Type | Description |
---|---|---|
elements | object | The DICOM elements to check. |
The value and a warning if the elements are not as expected.
- Type:
- object
getDefaultAnchor(x, y, id, style) → {Konva.Ellipse}
Get the default anchor shape.
Name | Type | Description |
---|---|---|
x | number | The X position. |
y | number | The Y position. |
id | string | The shape id. |
style | Style | The application style. |
- Source
The default anchor shape.
- Type:
- Konva.
Ellipse
getDefaultAnonymisationRules() → {Object.<string, WriterRule>}
Get simple (non official) DICOM anonymisation rules.
- Source
The rules.
- Type:
- Object.<string, WriterRule>
getDefaultDicomSegJson() → {object}
Get the default DICOM seg tags as an object.
- Source
The default tags.
- Type:
- object
getDefaultImage(width, height, sliceIndex, imageBuffer, numberOfFrames, imageUid) → {object}
Get an image from an input context imageData.
Name | Type | Description |
---|---|---|
width | number | The width of the coresponding image. |
height | number | The height of the coresponding image. |
sliceIndex | number | The slice index of the imageData. |
imageBuffer | object | The image buffer. |
numberOfFrames | number | The final number of frames. |
imageUid | string | The image UID. |
- Source
The corresponding view.
- Type:
- object
getDicomCode(value, scheme) → {DicomCode|undefined}
Get a DICOM code from a value (~id).
Name | Type | Description |
---|---|---|
value | string | The code value. |
scheme | string | The scheme designator. |
- Source
The DICOM code.
- Type:
- DicomCode |
undefined
getDicomCodeItem(code) → {Object.<string, any>}
Get a simple dicom element item from a code object.
Name | Type | Description |
---|---|---|
code | DicomCode | The code object. |
- Source
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomDate(dateObj) → {string}
Get a DICOM formated date string.
Name | Type | Description |
---|---|---|
dateObj | Object | The date to format. |
- Source
The formated date.
- Type:
- string
getDicomDateTime(datetime) → {string}
Get a DICOM formated datetime string.
Name | Type | Description |
---|---|---|
datetime | Object | The datetime to format. |
- Source
The formated datetime.
- Type:
- string
getDicomImageReferenceItem(ref) → {Object.<string, any>}
Get a simple dicom element item from a reference object.
Name | Type | Description |
---|---|---|
ref | ImageReference | The reference object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomMeasureItem(spacing) → {object}
Get a dicom item from a measure sequence.
Name | Type | Description |
---|---|---|
spacing | Spacing | The spacing object. |
The dicom item.
- Type:
- object
getDicomMeasuredValueItem(value) → {Object.<string, any>}
Get a simple dicom element item from a measured value object.
Name | Type | Description |
---|---|---|
value | MeasuredValue | The measured value object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomNumericMeasurementItem(measurement) → {Object.<string, any>}
Get a simple dicom element item from a measurement object.
Name | Type | Description |
---|---|---|
measurement | NumericMeasurement | The measurement object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomPlaneOrientationItem(orientation) → {object}
Get a dicom element from a plane orientation sequence.
Name | Type | Description |
---|---|---|
orientation | Matrix33 | The image orientation. |
The dicom element.
- Type:
- object
getDicomSRContentItem(content) → {Object.<string, any>}
Get a simple dicom element item from a content item object.
Name | Type | Description |
---|---|---|
content | DicomSRContent | The content item object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomSegmentFrameInfoItem(frameInfo) → {Object.<string, any>}
Get a dicom item from a frame information object.
Name | Type | Description |
---|---|---|
frameInfo | object | The frame information object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomSegmentItem(segment) → {Object.<string, any>}
Get a dicom simple tag from a segment object.
Name | Type | Description |
---|---|---|
segment | MaskSegment | The segment object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomSopInstanceReferenceItem(ref) → {Object.<string, any>}
Get a simple dicom element item from a SOP reference object.
Name | Type | Description |
---|---|---|
ref | SopInstanceReference | The SOP reference object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomSpatialCoordinate3DItem(scoord) → {Object.<string, any>}
Get a simple dicom element item from a scoord3d object.
Name | Type | Description |
---|---|---|
scoord | SpatialCoordinate3D | The scoord3d object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomSpatialCoordinateItem(scoord) → {Object.<string, any>}
Get a simple dicom element item from a scoord object.
Name | Type | Description |
---|---|---|
scoord | SpatialCoordinate | The scoord object. |
The item as a list of (key, value) pairs.
- Type:
- Object.<string, any>
getDicomTime(dateObj) → {string}
Get a DICOM formated time string.
Name | Type | Description |
---|---|---|
dateObj | Object | The date to format. |
- Source
The formated time.
- Type:
- string
getDimensionOrganization(dataElements) → {object}
Check the dimension organization from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | DataElements | The root dicom element. |
The dimension organizations and indices.
- Type:
- object
getDirIncr(dir) → {Array.<number>}
Get an increment vector for input directions.
Name | Type | Description |
---|---|---|
dir | Array.<number> | The directions. |
The increment vector.
- Type:
- Array.<number>
getDivIds(dataViewConfig) → {Array}
Get the layer group div ids associated to a view config.
Name | Type | Description |
---|---|---|
dataViewConfig | Array | The data view config. |
The list of div ids.
- Type:
- Array
getDwvUIDPrefix() → {string}
Get the dwv UID prefix. Issued by Medical Connections Ltd (www.medicalconnections.co.uk) on 25/10/2017.
- Source
The dwv UID prefix.
- Type:
- string
getDwvUrl(uri) → {string}
Get the dwv url from a data input uri.
Name | Type | Description |
---|---|---|
uri | * | The dwv input uri. |
- Source
The full dwv url.
- Type:
- string
getDwvVersion() → {string}
Get the version of the library.
- Source
The version of the library.
- Type:
- string
getElementAsString(tag, dicomElement, prefixopt) → {string}
Get a data element as a string.
Name | Type | Attributes | Description |
---|---|---|---|
tag | Tag | The DICOM tag. | |
dicomElement | object | The DICOM element. | |
prefix | string | <optional> | A string to prepend this one. |
The element as a string.
- Type:
- string
getElementValueAsString(tag, dicomElement, prettyopt) → {string}
Get a data element value as a string.
Name | Type | Attributes | Description |
---|---|---|---|
tag | Tag | The DICOM tag. | |
dicomElement | object | The DICOM element. | |
pretty | boolean | <optional> | When set to true, returns a 'pretified' content. |
A string representation of the DICOM element.
- Type:
- string
getElementsFromJSONTags(simpleTags) → {Object.<string, DataElement>}
Get the DICOM elements from a 'simple' DICOM tags object. The input object is a simplified version of the oficial DICOM json with tag names instead of keys and direct values (no value property) for simple tags. See synthetic test data (in tests/dicom) for examples.
Name | Type | Description |
---|---|---|
simpleTags | Object.<string, any> | The 'simple' DICOM tags object. |
The DICOM elements.
- Type:
- Object.<string, DataElement>
getEllipseIndices(center, radius, dir) → {Array.<Index>}
Get the indices that form a ellpise.
Name | Type | Description |
---|---|---|
center | Index | The ellipse center. |
radius | Array.<number> | The 2 ellipse radiuses. |
dir | Array.<number> | The 2 ellipse directions. |
- Source
The indices of the ellipse.
- Type:
- Array.<Index>
getEqualIndexCallback(i0) → {function}
Get an array find callback for an index.
Name | Type | Description |
---|---|---|
i0 | Index | The index to find. |
The find callback.
- Type:
- function
getEqualPoint3DFunction(point) → {function}
Get an array find callback for an equal input point.
Name | Type | Description |
---|---|---|
point | Point3D | The point to compare to. |
- Source
A function that compares, using equals
, its input point to the one given as input to this function.
- Type:
- function
getFileConfigsHtmlList(fileName)
Get the list of configs and display them with a download link.
Name | Type | Description |
---|---|---|
fileName | string | The input file name. |
getFileExtension(filePath) → {string}
Get a file extension: anything after the last dot. File name starting with a dot are discarded. Extensions are expected to contain at least one letter.
Name | Type | Description |
---|---|---|
filePath | string | The file path containing the file name. |
- Source
The lower case file extension or null for none.
- Type:
- string
getFileListFromDicomDir(data) → {Array|undefined}
Get the file list from a DICOMDIR.
Name | Type | Description |
---|---|---|
data | object | The buffer data of the DICOMDIR. |
The file list as an array ordered by STUDY > SERIES > IMAGES.
- Type:
- Array |
undefined
getFileMetaInformationGroupLengthTag() → {Tag}
Get the FileMetaInformationGroupLength Tag.
- Source
The tag.
- Type:
- Tag
getFindArrayInArrayCallback(arr1) → {function}
Get a find in array callback.
Name | Type | Description |
---|---|---|
arr1 | Uint8Array | The array to find. |
- Source
The find callback function.
- Type:
- function
getFlags(inputStr) → {Array.<string>}
Get flags from an input string. Flags are words surrounded with curly braces.
Name | Type | Description |
---|---|---|
inputStr | string | The input string. |
- Source
An array of found flags.
- Type:
- Array.<string>
getFullStats(values) → {Statistics}
Get full stats: minimum, maximum, mean, standard deviation, median, 25% and 75% percentile of an array of values.
Name | Type | Description |
---|---|---|
values | Array.<number> | The array of values to extract stats from. |
- Source
Complete statistics (includes median, p25 and p75).
- Type:
- Statistics
getIdentityMat33() → {Matrix33}
Create a 3x3 identity matrix.
- Source
The identity matrix.
- Type:
- Matrix33
getImage2DSize(elements) → {Array.<number>}
Extract the 2D size from dicom elements.
Name | Type | Description |
---|---|---|
elements | DataElements | The DICOM elements. |
The size.
- Type:
- Array.<number>
getImageReference(dataElements) → {ImageReference}
Get a reference object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A reference object.
- Type:
- ImageReference
getImageRegionCode() → {DicomCode}
Get an image region DICOM code.
- Source
The code.
- Type:
- DicomCode
getItemDelimitationItemTag() → {Tag}
Get the ItemDelimitationItem Tag.
- Source
The tag.
- Type:
- Tag
getItemTag() → {Tag}
Get the Item Tag.
- Source
The tag.
- Type:
- Tag
getIteratorValues(iterator) → {Array}
Get a list of values for a given iterator.
Name | Type | Description |
---|---|---|
iterator | object | The iterator to use to loop through data. |
- Source
The list of values.
- Type:
- Array
getLPSGroup(code) → {string|undefined}
Get the LPS 'group' (axial, coronal or sagittal) from a LPS code.
Name | Type | Description |
---|---|---|
code | string | The LPS code string. |
- Source
The group.
- Type:
- string |
undefined
getLayerDetailsFromEvent(event) → {object}
Get the layer details from a mouse event.
Name | Type | Description |
---|---|---|
event | object | The event to get the layer div id from. Expecting an event origininating from a canvas inside a layer HTML div with the 'layer' class and id generated with |
- Source
The layer details as {groupDivId, layerIndex, layerId}.
- Type:
- object
getLayerDetailsFromLayerDivId(idString) → {object}
Get the layer details from a div id.
Name | Type | Description |
---|---|---|
idString | string | The layer div id. |
- Source
The layer details as {groupDivId, layerIndex, layerId}.
- Type:
- object
getLayerDivId(groupDivId, layerIndex) → {string}
Get the layer div id.
Name | Type | Description |
---|---|---|
groupDivId | string | The layer group div id. |
layerIndex | number | The layer index. |
- Source
A string id.
- Type:
- string
getLineFromEquation(slope, intercept, point, length, spacingopt) → {Line}
Get a line from an equation, a middle point and a length.
Name | Type | Attributes | Description |
---|---|---|---|
slope | number | The line slope. | |
intercept | number | The line intercept. | |
point | Point2D | The middle point of the line. | |
length | number | The line length. | |
spacing | Scalar2D | <optional> | Optional image spacing, default to [1,1]. |
- Source
The resulting line.
- Type:
- Line
getLineShape(group) → {Konva.Line|undefined}
Get a Konva.Line shape from a group.
Name | Type | Description |
---|---|---|
group | Konva. | The group to look into. |
- Source
The shape.
- Type:
- Konva.
Line |undefined
getMPRDataViewConfig(dataIds) → {object}
Get MPR view config(s).
Name | Type | Description |
---|---|---|
dataIds | Array | The list of dataIds. |
- Source
The view config.
- Type:
- object
getMatrixFromName(name) → {Matrix33|undefined}
Get an orientation matrix from a name.
Name | Type | Description |
---|---|---|
name | string | The orientation name. |
- Source
The orientation matrix.
- Type:
- Matrix33 |
undefined
getMatrixInverse(m) → {Matrix33|undefined}
Get the inverse of an input 3*3 matrix.
Ref:
Name | Type | Description |
---|---|---|
m | Matrix33 | The input matrix. |
- Source
The inverse matrix or undefined if the determinant is zero.
- Type:
- Matrix33 |
undefined
getMeasuredValue(dataElements) → {MeasuredValue}
Get a measured value object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A measured value object.
- Type:
- MeasuredValue
getMeasurementGroupCode() → {DicomCode}
Get a measurement group DICOM code.
- Source
The code.
- Type:
- DicomCode
getMeasurementUnitsCode(name) → {DicomCode|undefined}
Get a measurement units DICOM code.
Name | Type | Description |
---|---|---|
name | string | The unit name as defined in a quantification object. |
- Source
The code.
- Type:
- DicomCode |
undefined
getMetaDataWithNames(metaData) → {Object.<string, DataElement>}
Get the meta data indexed by tag names instead of tag keys.
Name | Type | Description |
---|---|---|
metaData | Object.<string, DataElement> | The meta data index by tag keys. |
- Source
The meta data indexed by tag names.
- Type:
- Object.<string, DataElement>
getMousePoint(event) → {Point2D}
Get the offset of an input mouse event.
Name | Type | Description |
---|---|---|
event | object | The event to get the offset from. |
- Source
The 2D point.
- Type:
- Point2D
getNumberToPrecision(precision) → {function}
Get a number toprecision function with the provided precision.
Name | Type | Description |
---|---|---|
precision | number | The precision to achieve. |
- Source
The to precision function.
- Type:
- function
getNumericMeasurement(dataElements) → {NumericMeasurement}
Get a measurement object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A measurement object.
- Type:
- NumericMeasurement
getObjectUrlFromTags(config) → {string}
Create an object url from (JSON) tags.
Name | Type | Description |
---|---|---|
config | object | The data configuration. |
The object URL.
- Type:
- string
getOnInstancesLoad(seriesUID, numberOfSeries) → {function}
Get an instances QIDO query load handler.
Name | Type | Description |
---|---|---|
seriesUID | string | The series UID. |
numberOfSeries | number | The number of series. |
- Source
The hanlder.
- Type:
- function
getOnLoadError(reqName) → {function}
Get a load error handler.
Name | Type | Description |
---|---|---|
reqName | string | The request name. |
- Source
The error handler.
- Type:
- function
getOnebyOneDataViewConfig(dataIds) → {object}
Create 1*2 view config(s).
Name | Type | Description |
---|---|---|
dataIds | Array | The list of dataIds. |
- Source
The view config.
- Type:
- object
getOnebyTwoDataViewConfig(dataIds) → {object}
Create 1*2 view config(s).
Name | Type | Description |
---|---|---|
dataIds | Array | The list of dataIds. |
- Source
The view config.
- Type:
- object
getOrientationFromCosines(cosines) → {Matrix33|undefined}
Get the orientation matrix associated to the direction cosines.
Name | Type | Description |
---|---|---|
cosines | Array.<number> | The image orientation patient cosines (6 values). |
- Source
The orientation matrix.
- Type:
- Matrix33 |
undefined
getOrientationMatrix(dataElements) → {Matrix33|undefined}
Get an orientation matrix from a dicom orientation element.
Name | Type | Description |
---|---|---|
dataElements | DataElements | The dicom element. |
The orientation matrix.
- Type:
- Matrix33 |
undefined
getOrientationName(cosines) → {string|undefined}
Get the name of an image orientation patient.
Name | Type | Description |
---|---|---|
cosines | Array.<number> | The image orientation patient cosines (6 values). |
- Source
The orientation name: axial, coronal or sagittal.
- Type:
- string |
undefined
getOrientationStringLPS(matrix) → {string}
Get the orientation code of an orientation matrix. Each letter defines the towards direction. Letters are: R (right), L (left), A (anterior), P (posterior), I (inferior) and S (superior).
Name | Type | Description |
---|---|---|
matrix | Matrix33 | The orientation matrix. |
- Source
The orientation code.
- Type:
- string
getOrientedArray3D(array3D, orientation) → {Array.<number>}
Get the oriented values of an input 3D array.
Name | Type | Description |
---|---|---|
array3D | Array.<number> | The 3D array. |
orientation | Matrix33 | The orientation 3D matrix. |
- Source
The values reordered according to the orientation.
- Type:
- Array.<number>
getPathCode() → {DicomCode}
Get a path DICOM code.
- Source
The code.
- Type:
- DicomCode
getPercentile(values, ratio) → {number}
Get an arrays' percentile. Uses linear interpolation for percentiles that lie between data points. See: https://en.wikipedia.org/wiki/Percentile (second variant interpolation).
Name | Type | Description |
---|---|---|
values | Array.<number> | The sorted array of values. |
ratio | number | The percentile ratio [0-1]. |
- Source
The percentile.
- Type:
- number
getPerpendicularLine(line, point, length, spacingopt) → {Line}
Get a perpendicular line to an input one at a given point.
Name | Type | Attributes | Description |
---|---|---|---|
line | Line | The line to be perpendicular to. | |
point | Point2D | The middle point of the perpendicular line. | |
length | number | The length of the perpendicular line. | |
spacing | Scalar2D | <optional> | Optional image spacing, default to [1,1]. |
- Source
The perpendicular line.
- Type:
- Line
getPerpendicularLineAtDistance(line, distance, length, spacingopt) → {Line}
Get a perpendicular line to an input one at a given distance of its begin point.
Name | Type | Attributes | Description |
---|---|---|---|
line | Line | The line to be perpendicular to. | |
distance | number | The distance to the input line begin point. | |
length | number | The length of the perpendicular line. | |
spacing | Scalar2D | <optional> | Optional image spacing, default to [1,1]. |
- Source
The perpendicular line.
- Type:
- Line
getPixelDataTag() → {Tag}
Get the PixelData Tag.
- Source
The tag.
- Type:
- Tag
getPixelGeneratorName() → {string}
The name of the selected pixel generator.
- Type:
- string
getPixelSpacing(elements) → {Spacing}
Get the pixel spacing from the different spacing tags.
Name | Type | Description |
---|---|---|
elements | DataElements | The DICOM elements. |
The read spacing or the default [1,1].
- Type:
- Spacing
getPixelUnit(elements) → {string|null}
Get the pixel data unit.
Name | Type | Description |
---|---|---|
elements | DataElements | The DICOM elements. |
The unit value if available.
- Type:
- string |
null
getPrecisionRound(precision) → {function}
Get a rounding function for a specific precision.
Name | Type | Description |
---|---|---|
precision | number | The rounding precision. |
- Source
The rounding function.
- Type:
- function
getQuantificationName(code) → {string|undefined}
Get the DICOM code for a quantification name.
Name | Type | Description |
---|---|---|
code | DicomCode | The Dicom code. |
- Source
The quantification name.
- Type:
- string |
undefined
getQuantificationUnit(code) → {string}
Get a quantification unit name.
Name | Type | Description |
---|---|---|
code | DicomCode | The code to get the unit from. |
- Source
The quantification unit.
- Type:
- string
getRectangleIndices(center, size, dir) → {Array.<Index>}
Get the indices that form a rectangle.
Name | Type | Description |
---|---|---|
center | Index | The rectangle center. |
size | Array.<number> | The 2 rectangle sizes. |
dir | Array.<number> | The 2 rectangle directions. |
- Source
The indices of the rectangle.
- Type:
- Array.<Index>
getReferenceGeometryCode() → {DicomCode}
Get a reference geometry DICOM code.
- Source
The code.
- Type:
- DicomCode
getReferencePointsCode() → {DicomCode}
Get a reference points DICOM code.
- Source
The code.
- Type:
- DicomCode
getRegionSliceIterator(image, index, isRescaled, min, max) → {object}
Get a slice index iterator for a rectangular region.
Name | Type | Description |
---|---|---|
image | Image | The image to parse. |
index | Index | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
min | Point2D | The minimum position (optional). |
max | Point2D | The maximum position (optional). |
- Source
The slice iterator.
- Type:
- object
getReverseOrientation(ori) → {string}
Get patient orientation label in the reverse direction.
Name | Type | Description |
---|---|---|
ori | string | Patient Orientation value. |
- Source
Reverse Orientation Label.
- Type:
- string
getRootPath(path) → {string}
Get the root of an input path. Splits using /
as separator.
Name | Type | Description |
---|---|---|
path | string | The input path. |
- Source
The input path without its last part.
- Type:
- string
getRulesAndResult0(config) → {object}
Get writing rules #0 and resulting tags.
Name | Type | Description |
---|---|---|
config | object | A JSON config representing DICOM tags. |
Rules and resulting tags.
- Type:
- object
getRunRenderTest(app) → {function}
Run render tests.
Name | Type | Description |
---|---|---|
app | object | The associated application. |
The run render text function.
- Type:
- function
getSRContent(dataElements) → {DicomSRContent}
Get a content item object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A content item object.
- Type:
- DicomSRContent
getSRContentFromValue(name, value, unit) → {DicomSRContent|undefined}
Get a DicomSRContent from a value.
Name | Type | Description |
---|---|---|
name | string | The value name. |
value | object | The value. |
unit | string | The values' unit. |
The SR content.
- Type:
- DicomSRContent |
undefined
getSagittalMat33() → {Matrix33}
Create a 3x3 sagittal (yzx) matrix.
- Source
The sagittal matrix.
- Type:
- Matrix33
getScaledOffset(offset, scale, newScale, center) → {Scalar2D}
Get a scaled offset to adapt to new scale and such as the input center stays at the same position.
Name | Type | Description |
---|---|---|
offset | Scalar2D | The previous offset as {x,y}. |
scale | Scalar2D | The previous scale as {x,y}. |
newScale | Scalar2D | The new scale as {x,y}. |
center | Scalar2D | The scale center as {x,y}. |
- Source
The scaled offset as {x,y}.
- Type:
- Scalar2D
getScoordFromShape(shape) → {SpatialCoordinate}
Get a DICOM spatial coordinate (SCOORD) from a mathematical shape.
Name | Type | Description |
---|---|---|
shape | Point2D | | The math shape. |
The DICOM scoord.
- Type:
- SpatialCoordinate
getSegment(dataElements) → {MaskSegment}
Get a segment object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A segment object.
- Type:
- MaskSegment
getSegmentFrameInfo(dataElements) → {DicomSegmentFrameInfo}
Get a frame information object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A frame information object.
- Type:
- DicomSegmentFrameInfo
getSegmentationCode() → {DicomCode}
Get a segmentation DICOM code.
- Source
The code.
- Type:
- DicomCode
getSequenceDelimitationItemTag() → {Tag}
Get the SequenceDelimitationItem Tag.
- Source
The tag.
- Type:
- Tag
getShadowColour(hexColour) → {string}
Get the shadow colour of an input colour.
Name | Type | Description |
---|---|---|
hexColour | string | The colour (as '#ab01ef'). |
- Source
The shadow colour (white or black).
- Type:
- string
getShapeDisplayName(shape) → {string}
Get the display name of the input shape.
Name | Type | Description |
---|---|---|
shape | Konva. | The Konva shape. |
- Source
The display name.
- Type:
- string
getShapeFromScoord(scoord) → {Point2D|Line|Protractor|ROI|Circle|Ellipse|Rectangle}
Get a mathematical shape from a DICOM spatial coordinate (SCOORD).
Name | Type | Description |
---|---|---|
scoord | SpatialCoordinate | The DICOM scoord. |
getShapePositionRange(stageSize, shape) → {object}
Get a shape top left position range.
Name | Type | Description |
---|---|---|
stageSize | Scalar2D | The stage size as {x,y}. |
shape | Konva. | The shape to evaluate. |
- Source
The range as {min, max}.
- Type:
- object
getShortLabelCode() → {DicomCode}
Get a short label DICOM code.
- Source
The code.
- Type:
- DicomCode
getSliceGeometrySpacing(origins) → {number|undefined}
Get the slice spacing from the difference in the Z directions of input origins.
Name | Type | Description |
---|---|---|
origins | Array.<Point3D> | An array of Point3D. |
- Source
The spacing.
- Type:
- number |
undefined
getSliceIndex(volumeGeometry, sliceGeometry) → {Index}
Get the slice index of an input slice into a volume geometry.
Name | Type | Description |
---|---|---|
volumeGeometry | Geometry | The volume geometry. |
sliceGeometry | Geometry | The slice geometry. |
- Source
The index of the slice in the volume geomtry.
- Type:
- Index
getSliceIterator(image, position, isRescaled, viewOrientation) → {object}
Get a slice index iterator.
Name | Type | Description |
---|---|---|
image | Image | The image to parse. |
position | Index | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
viewOrientation | Matrix33 | The view orientation. |
- Source
The slice iterator.
- Type:
- object
getSopInstanceReference(dataElements) → {SopInstanceReference}
Get a SOP reference object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A SOP reference object.
- Type:
- SopInstanceReference
getSourceImageCode() → {DicomCode}
Get a source image DICOM code.
- Source
The code.
- Type:
- DicomCode
getSourceImageForProcessingCode() → {DicomCode}
Get a source image for processing DICOM code.
- Source
The code.
- Type:
- DicomCode
getSpacingFromMeasure(dataElements) → {Spacing}
Get a spacing object from a dicom measure element.
Name | Type | Description |
---|---|---|
dataElements | DataElements | The dicom element. |
A spacing object.
- Type:
- Spacing
getSpatialCoordinate(dataElements) → {SpatialCoordinate}
Get a scoord object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A scoord object.
- Type:
- SpatialCoordinate
getSpatialCoordinate3D(dataElements) → {SpatialCoordinate3D}
Get a scoord3d object from a dicom element.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The dicom element. |
A scoord3d object.
- Type:
- SpatialCoordinate3D
getSpinY(event) → {number}
Get a normalised spin speed in the Y direction to try to support trackpads (small and large deltaY) and mouse wheel (large deltaY). Should return 1 or -1 for a single mouse wheel tick.
Name | Type | Description |
---|---|---|
event | object | The wheel event. |
- Source
The normalised spin Y.
- Type:
- number
getStats(values, flags) → {Statistics}
Get statistics on an input array of number. Note: could use https://github.com/tmcw/simple-statistics.
Name | Type | Description |
---|---|---|
values | Array.<number> | The array of values to extract stats from. |
flags | Array.<string> | A list of stat value names to calculate. |
- Source
A statistics object.
- Type:
- Statistics
getSuvFactor(elements) → {object}
Get the PET SUV factor.
Ref:
Name | Type | Description |
---|---|---|
elements | object | The DICOM elements. |
The value and a warning if the elements are not as expected.
- Type:
- object
getSyntaxDecompressionName(syntax) → {string|undefined}
Tell if a given syntax needs decompression.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
The name of the decompression algorithm.
- Type:
- string |
undefined
getTagFromDictionary(tagName) → {Tag|undefined}
Get a tag from the dictionary using a tag string name.
Name | Type | Description |
---|---|---|
tagName | string | The tag string name. |
- Source
The tag object or null if not found.
- Type:
- Tag |
undefined
getTagFromKey(key) → {Tag}
Split a group-element key used to store DICOM elements.
Name | Type | Description |
---|---|---|
key | string | The key in form "00280102" as generated by tag::getKey. |
- Source
The DICOM tag.
- Type:
- Tag
getTagKeysReducer(dataElements) → {function}
Get an array reducer to reduce an array of tag keys taken from the input dataElements and return theses dataElements indexed by tag names.
Name | Type | Description |
---|---|---|
dataElements | Object.<string, DataElement> | The meta data index by tag keys. |
- Source
An array reducer.
- Type:
- function
getTargetOrientation(imageOrientation, viewOrientation) → {Matrix33}
Get the target orientation according to an image and view orientation. The target orientation is used to go from target to real space.
Name | Type | Description |
---|---|---|
imageOrientation | Matrix33 | The image geometry. |
viewOrientation | Matrix33 | The view orientation. |
- Source
The target orientation.
- Type:
- Matrix33
getThumbInstanceUID(json) → {string}
Get the SOPInstanceUID of the thumbnail instance.
Name | Type | Description |
---|---|---|
json | object | An instances QIDO query result. |
- Source
The SOPInstanceUID.
- Type:
- string
getTime(element) → {Object|undefined}
Get a time object with {hours, minutes, seconds} ready for the Date constructor from a DICOM element with vr=TM.
Name | Type | Description |
---|---|---|
element | DataElement | The DICOM element with date information. |
- Source
The time object.
- Type:
- Object |
undefined
getToken() → {string|undefined}
Get the optional token.
- Source
The token.
- Type:
- string |
undefined
getTouchPoints(event) → {Array.<Point2D>}
Get the offsets of an input touch event.
Name | Type | Description |
---|---|---|
event | object | The event to get the offset from. |
- Source
The array of points.
- Type:
- Array.<Point2D>
getTouchesPositions(touches) → {Array.<Point2D>}
Get the positions (without the parent offset) of a list of touch events.
Name | Type | Description |
---|---|---|
touches | Array | The list of touch events. |
- Source
The list of positions of the touch events.
- Type:
- Array.<Point2D>
getTrackingIdentifierCode() → {DicomCode}
Get a tracking identifier DICOM code.
- Source
The code.
- Type:
- DicomCode
getTransferSyntaxName(syntax) → {string}
Get a transfer syntax name from its UID.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax UID value. |
- Source
The transfer syntax name.
- Type:
- string
getTransferSyntaxUIDTag() → {Tag}
Get the TransferSyntaxUID Tag.
- Source
The tag.
- Type:
- Tag
getTypedArray(bitsAllocated, pixelRepresentation, size) → {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array}
Get the appropriate TypedArray in function of arguments.
Name | Type | Description |
---|---|---|
bitsAllocated | number | The number of bites used to store the data: [8, 16, 32]. |
pixelRepresentation | number | The pixel representation, 0:unsigned;1:signed. |
size | number | The size of the new array. |
- Source
The good typed array.
- Type:
- Uint8Array |
Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array
getUID(tagName) → {string}
Name | Type | Description |
---|---|---|
tagName | string | The input tag. |
- Source
The corresponding UID.
- Type:
- string
getUint8ToVrValue(value, vr, isLittleEndianopt) → {object}
Get the casted typed array value from Uint8 to vr type.
Name | Type | Attributes | Description |
---|---|---|---|
value | object | The value to cast. | |
vr | string | The DICOM element VR. | |
isLittleEndian | boolean | <optional> | Flag to tell if the data is little or big endian (default: true). |
The element value casted to the vr type.
- Type:
- object
getUriQuery(uri) → {object}
Get the query part, split into an array, of an input URI. The URI scheme is: base?query#fragment
.
Name | Type | Description |
---|---|---|
uri | string | The input URI. |
- Source
The query part, split into an array, of the input URI.
- Type:
- object
getUrlFromUri(uri) → {URL}
Get an full object URL from a string uri.
Name | Type | Description |
---|---|---|
uri | string | A string representing the url. |
- Source
A URL object.
- Type:
- URL
getUtfLabel(charSetTerm) → {string}
Get the utfLabel (used by the TextDecoder) from a character set term.
References:
- DICOM Value Encoding,
- DICOM Specific Character Set,
- TextDecoder#Parameters.
Name | Type | Description |
---|---|---|
charSetTerm | string | The DICOM character set. |
- Source
The corresponding UTF label.
- Type:
- string
getVariableRegionSliceIterator(image, index, isRescaled, regions) → {object|undefined}
Get a slice index iterator for a rectangular region.
Name | Type | Description |
---|---|---|
image | Image | The image to parse. |
index | Index | The current position. |
isRescaled | boolean | Flag for rescaled values (default false). |
regions | Array.<Array.<Array.<number>>> | An array of [x, y] pairs (min, max). |
- Source
The slice iterator.
- Type:
- object |
undefined
getVectorStringLPS(vector) → {string}
Get the orientation code of an orientation vector. Credits: David Clunie, https://www.dclunie.com/medical-image-faq/html/part2.html.
Name | Type | Description |
---|---|---|
vector | Vector3D | The orientation vector. |
- Source
The orientation code.
- Type:
- string
getViewFromDOMImage(domImage, origin, index) → {object}
Get data from an input image using a canvas.
Name | Type | Description |
---|---|---|
domImage | HTMLImageElement | The DOM Image, an HTMLImageElement with extra info. |
origin | string | | The data origin. |
index | number | The data index. |
- Source
A load data event.
- Type:
- object
getViewFromDOMVideo(video, onloaditem, onload, onprogress, onloadend, origin, dataIndex)
Get data from an input image using a canvas.
Name | Type | Description |
---|---|---|
video | object | The DOM Video, an HTMLVideoElement with extra info. |
onloaditem | function | On load callback. |
onload | object | The function to call once the data is loaded. |
onprogress | object | The function to call to report progress. |
onloadend | object | The function to call to report load end. |
origin | string | | The data origin. |
dataIndex | number | The data index. |
- Source
getViewOrientation(imageOrientation, targetOrientation) → {Matrix33}
Get the view orientation according to an image and target orientation. The view orientation is used to go from target to image space.
Name | Type | Description |
---|---|---|
imageOrientation | Matrix33 | The image geometry. |
targetOrientation | Matrix33 | The target orientation. |
- Source
The view orientation.
- Type:
- Matrix33
getVrPad(vr) → {string}
Get the VR specific padding value.
Name | Type | Description |
---|---|---|
vr | string | The element VR. |
- Source
The value used to pad.
- Type:
- string
getZeroIndex(size) → {Index}
Get an index with values set to 0 and the input size.
Name | Type | Description |
---|---|---|
size | number | The size of the index. |
- Source
The zero index.
- Type:
- Index
gradDirection(gradX, gradY, px, py, qx, qy) → {number}
Compute the gradient direction.
Name | Type | Description |
---|---|---|
gradX | Array | The X gradient. |
gradY | Array | The Y gradient. |
px | number | The point X. |
py | number | The point Y. |
qx | number | The q X. |
qy | number | The q Y. |
- Source
The direction.
- Type:
- number
gradUnitVector(gradX, gradY, px, py, out)
Compute the gradient unit vector.
Name | Type | Description |
---|---|---|
gradX | Array | The X gradient. |
gradY | Array | The Y gradient. |
px | number | The point X. |
py | number | The point Y. |
out | object | The result. |
- Source
guessTransferSyntax(firstDataElement) → {DataElement}
Guess the transfer syntax from the first data element.
See https://github.com/ivmartel/dwv/issues/188 (Allow to load DICOM with no DICM preamble) for more details.
Name | Type | Description |
---|---|---|
firstDataElement | DataElement | The first data element of the DICOM header. |
- Source
The transfer syntax data element.
- Type:
- DataElement
guid() → {string}
Unique ID generator.
See http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript and this answer.
- Source
A unique ID.
- Type:
- string
hasDicomPrefix(buffer) → {boolean}
Check that an input buffer includes the DICOM prefix 'DICM' after the 128 bytes preamble.
Ref: DICOM File Meta.
Name | Type | Description |
---|---|---|
buffer | ArrayBuffer | The buffer to check. |
- Source
True if the buffer includes the prefix.
- Type:
- boolean
hexToRgb(hexStr) → {RGB}
Convert a hex color into RGB.
Name | Type | Description |
---|---|---|
hexStr | string | The hex color as '#ab01ef'. |
- Source
The RGB values as {r,g,b}.
- Type:
- RGB
id(i) → {number}
Identity, returns i.
Name | Type | Description |
---|---|---|
i | number | The input index. |
- Source
The lut value.
- Type:
- number
imageDataToBuffer(imageData) → {Uint8Array}
Create a simple array buffer from an ImageData buffer.
Name | Type | Description |
---|---|---|
imageData | object | The ImageData taken from a context. |
- Source
The image buffer.
- Type:
- Uint8Array
includesFullStatsFlags(flags) → {boolean}
Does the input flag list contain a full stat element?
Name | Type | Description |
---|---|---|
flags | Array.<string> | A list of stat values to calculate. |
- Source
True if one of the flags is a full stat flag.
- Type:
- boolean
invId(i) → {number}
Returns lut_range_max minus one minus i.
Name | Type | Description |
---|---|---|
i | number | The input index. |
- Source
The lut value.
- Type:
- number
is32bitVLVR(vr) → {boolean}
Does the input Value Representation (VR) have a 32bit Value Length (VL).
Name | Type | Description |
---|---|---|
vr | string | The data Value Representation (VR). |
- Source
True if this VR has a 32-bit VL.
- Type:
- boolean
isBigEndianTransferSyntax(syntax) → {boolean}
Tell if a given syntax is a big endian syntax.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a big endian syntax.
- Type:
- boolean
isCharSetStringVR(vr) → {boolean}
Does the input Value Representation (VR) have an special character repertoire.
Name | Type | Description |
---|---|---|
vr | string | The data VR. |
- Source
True if this VR has a special char set.
- Type:
- boolean
isDarkColour(hexColour) → {boolean}
Check if a colour given in hexadecimal format is dark.
Name | Type | Description |
---|---|---|
hexColour | string | The colour (as '#ab01ef'). |
- Source
True if the colour is dark (brightness < 0.5).
- Type:
- boolean
isEqualCode(code1, code2) → {boolean}
Check if two code objects are equal.
- Source
True if both codes are equal.
- Type:
- boolean
isEqualContentItem(item1, item2) → {boolean}
Check if two content item objects are equal.
Name | Type | Description |
---|---|---|
item1 | DicomCode | The first content item. |
item2 | DicomCode | The second content item. |
True if both content items are equal.
- Type:
- boolean
isEqualRgb(c1, c2) → {boolean}
Check if two rgb objects are equal.
- Source
True if both colour are equal.
- Type:
- boolean
isEqualSegment(seg1, seg2) → {boolean}
Check if two segment objects are equal.
Name | Type | Description |
---|---|---|
seg1 | MaskSegment | The first segment. |
seg2 | MaskSegment | The second segment. |
True if both segment are equal.
- Type:
- boolean
isEqualSegmentFrameInfo(dsfi1, dsfi2) → {boolean}
Check if two frame info objects are equal.
Name | Type | Description |
---|---|---|
dsfi1 | DicomSegmentFrameInfo | The first frame info. |
dsfi2 | DicomSegmentFrameInfo | The second frame info. |
True if both frame info are equal.
- Type:
- boolean
isEven(number) → {boolean}
Return true if the input number is even.
Name | Type | Description |
---|---|---|
number | number | The number to check. |
- Source
True is the number is even.
- Type:
- boolean
isFileMetaInformationGroupLengthTag(tag) → {boolean}
Is the input tag the FileMetaInformationGroupLength Tag.
Name | Type | Description |
---|---|---|
tag | Tag | The tag to test. |
- Source
True if the asked tag.
- Type:
- boolean
isIdentityMat33(mat33) → {boolean}
Check if a matrix is a 3x3 identity matrix.
Name | Type | Description |
---|---|---|
mat33 | Matrix33 | The matrix to test. |
- Source
True if identity.
- Type:
- boolean
isImplicitTransferSyntax(syntax) → {boolean}
Tell if a given syntax is an implicit one (element with no VR).
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if an implicit syntax.
- Type:
- boolean
isItemDelimitationItemTag(tag) → {boolean}
Is the input tag the ItemDelimitationItem Tag.
Name | Type | Description |
---|---|---|
tag | Tag | The tag to test. |
- Source
True if the asked tag.
- Type:
- boolean
isItemTag(tag) → {boolean}
Is the input tag the Item Tag.
Name | Type | Description |
---|---|---|
tag | Tag | The tag to test. |
- Source
True if the asked tag.
- Type:
- boolean
isJpeg2000TransferSyntax(syntax) → {boolean}
Tell if a given syntax is a JPEG 2000 one.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a jpeg 2000 syntax.
- Type:
- boolean
isJpegBaselineTransferSyntax(syntax) → {boolean}
Tell if a given syntax is a JPEG baseline one.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a jpeg baseline syntax.
- Type:
- boolean
isJpegLosslessTransferSyntax(syntax) → {boolean}
Tell if a given syntax is a JPEG Lossless one.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a jpeg lossless syntax.
- Type:
- boolean
isKnownVR(vr) → {boolean}
Is the input VR a known VR.
Name | Type | Description |
---|---|---|
vr | string | The vr to test. |
- Source
True if known.
- Type:
- boolean
isNativeLittleEndian() → {boolean}
Is the Native endianness Little Endian.
- Source
True if little endian.
- Type:
- boolean
isNodeNameLabel(node) → {boolean}
Is an input node's name 'label'.
Name | Type | Description |
---|---|---|
node | Konva. | A Konva node. |
- Source
True if the node's name is 'label'.
- Type:
- boolean
isNodeNameShape(node) → {boolean}
Is an input node's name 'shape'.
Name | Type | Description |
---|---|---|
node | Konva. | A Konva node. |
- Source
True if the node's name is 'shape'.
- Type:
- boolean
isNodeWithId(id) → {testFn}
Get a lambda to check a node's id.
Name | Type | Description |
---|---|---|
id | string | The id to check. |
- Source
A function to check a node's id.
- Type:
- testFn
isPixelDataTag(tag) → {boolean}
Is the input tag the PixelData Tag.
Name | Type | Description |
---|---|---|
tag | Tag | The tag to test. |
- Source
True if the asked tag.
- Type:
- boolean
isPointInLineRange(point, line) → {boolean}
Check if a point is in a line coordinate range.
- Source
True if the input point is in the line coordinate range.
- Type:
- boolean
isPositionNode(node) → {boolean}
Is an input node a position node.
Name | Type | Description |
---|---|---|
node | Konva. | A Konva node. |
- Source
True if the node's name is 'position-group'.
- Type:
- boolean
isReadSupportedTransferSyntax(syntax) → {boolean}
Tell if a given syntax is supported for reading.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a supported syntax.
- Type:
- boolean
isRleTransferSyntax(syntax) → {boolean}
Tell if a given syntax is a RLE (Run-length encoding) one.
Name | Type | Description |
---|---|---|
syntax | string | The transfer syntax to test. |
- Source
True if a RLE syntax.
- Type:
- boolean
isSequenceDelimitationItemTag(tag) → {boolean}
Is the input tag the SequenceDelimitationItem Tag.
Name | Type | Description |
---|---|---|
tag | Tag | The tag to test. |
- Source
True if the asked tag.
- Type:
- boolean
isShapeInRange(shape, min, max) → {boolean}
Is an input shape top left position in the input range.
Name | Type | Description |
---|---|---|
shape | Konva. | The shape to evaluate. |
min | Point2D | The minimum top left position. |
max | Point2D | The maximum top left position. |
- Source
True if in range.
- Type:
- boolean
isSimilar(a, b, tol) → {boolean}
Check if two numbers are similar.
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
tol | number | The comparison tolerance, default to Number.EPSILON. |
- Source
True if similar.
- Type:
- boolean
isSimilarSegment(seg1, seg2) → {boolean}
Check if two segment objects are similar: either the number or the displayValue are equal.
Name | Type | Description |
---|---|---|
seg1 | MaskSegment | The first segment. |
seg2 | MaskSegment | The second segment. |
True if both segment are similar.
- Type:
- boolean
isStringVr(vr) → {boolean}
Is the input VR a string VR.
Name | Type | Description |
---|---|---|
vr | string | The element VR. |
- Source
True if the VR is a string one.
- Type:
- boolean
isTypedArrayVr(vr) → {boolean}
Is the input VR a VR that stores data in a typed array. TODO: include ox and xs?
Name | Type | Description |
---|---|---|
vr | string | The element VR. |
- Source
True if the VR is a typed array one.
- Type:
- boolean
isValidRules() → {boolean}
Is the JSON valid?
True if the input JSON is valid.
- Type:
- boolean
isValidTags() → {boolean}
Is the JSON valid?
True if the tags are a valid JSON.
- Type:
- boolean
isVrToPad(vr) → {boolean}
Is the input VR a VR that could need padding.
See http://dicom.nema.org/medical/dicom/2022a/output/chtml/part05/sect_6.2.html.
Name | Type | Description |
---|---|---|
vr | string | The element VR. |
- Source
True if the VR needs padding.
- Type:
- boolean
konvaToAnnotation(drawings, drawingsDetails) → {Array.<Annotation>}
Convert a KonvaLayer object to a list of annotations.
Name | Type | Description |
---|---|---|
drawings | Array | An array of drawings stored with 'KonvaLayer().toObject()'. |
drawingsDetails | Array.<DrawDetails> | An array of drawings details. |
- Source
The associated list of annotations.
- Type:
- Array.<Annotation>
labToUintLab(triplet) → {object}
CIE LAB value (L: [0, 100], a: [-128, 127], b: [-128, 127]) to unsigned int CIE LAB ([0, 65535]).
Name | Type | Description |
---|---|---|
triplet | object | CIE XYZ triplet as {l,a,b} with CIE LAB range. |
- Source
CIE LAB triplet as {l,a,b} with unsigned range.
- Type:
- object
launchJSONLint()
Open JSONLint to check the rules.
launchJSONLint()
Open JSONLint to check the tags.
launchMainQido()
Launch main QIDO query to retrieve series.
- Source
launchQido(url, loadCallback, reqName)
Launch a QIDO request.
Name | Type | Description |
---|---|---|
url | string | The url of the request. |
loadCallback | function | The load callback. |
reqName | string | The request name. |
- Source
launchStowInstances()
Launch a STOW request per instances.
- Source
launchStowMultipart()
Launch a STOW request with multipart data. Beware: large request could timeout...
- Source
logFramePosPats(elements)
Log the DICCOM seg segments ordered by frame position patients.
Name | Type | Description |
---|---|---|
elements | object | The DICOM seg elements. |
- Source
mergeConfigs(config, configToMerge) → {object}
Merge a data config into the first input one. Copies all but the divId and orientation property.
Name | Type | Description |
---|---|---|
config | object | The config where to merge. |
configToMerge | object | The config to merge. |
- Source
The updated config.
- Type:
- object
mergeObjects(obj1, obj2, idKey, valueKey) → {object}
Merge two similar objects.
Objects need to be in the form of: { idKey: {valueKey: [0]}, key0: {valueKey: ["abc"]}, key1: {valueKey: [33]} }
.
Merged objects will be in the form of: { idKey: {valueKey: [0,1,2], merged: true}, key0: {valueKey: { 0: ["abc"], 1: ["def"], 2: ["ghi"] }}, key1: {valueKey: { 0: [33], 1: [44], 2: [55] }} }
.
Name | Type | Description |
---|---|---|
obj1 | object | The first object, can be the result of a previous merge. |
obj2 | object | The second object. |
idKey | string | The key to use as index for duplicate values. |
valueKey | string | The key to use to access object values. |
- Source
The merged object.
- Type:
- object
mergeTags(tags1, tags2)
Merge two tag lists.
Name | Type | Description |
---|---|---|
tags1 | object | Base list, will be modified. |
tags2 | object | List to merge. |
mergeTags(tags1, tags2)
Merge two tag lists.
Name | Type | Description |
---|---|---|
tags1 | object | Base list, will be modified. |
tags2 | object | List to merge. |
- Source
mprCheckTags(tags, image) → {boolean}
Check tags are coherent with image size.
Name | Type | Description |
---|---|---|
tags | object | The tags to check. |
image | object | The associated image. |
True if the tags are ok.
- Type:
- boolean
mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number
mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number
mulABC(a, b, c) → {number}
Mulitply the three inputs if the last two are not null.
Name | Type | Description |
---|---|---|
a | number | The first input. |
b | number | The second input. |
c | number | The third input. |
- Source
The multiplication of the three inputs or null if one of the last two is null.
- Type:
- number
onChangeParsers(input)
Handle a parser change.
Name | Type | Description |
---|---|---|
input | object | The new parser. |
- Source
onChangeTests(input)
Handle a parser test change.
Name | Type | Description |
---|---|---|
input | object | The new test. |
- Source
onDOMContentLoaded()
Setup.
onDOMContentLoaded()
Setup.
onDOMContentLoaded()
Setup.
onDOMContentLoaded()
Setup.
onDOMContentLoaded()
Setup.
- Source
onDOMContentLoaded()
Setup.
- Source
onDOMContentLoaded()
Setup.
- Source
onGenerate()
Generate DICOM data.
onInputDICOMFile(event)
Handle input DICOM file.
Name | Type | Description |
---|---|---|
event | object | The input field event. |
onInputImageFiles(event)
Handle input image file.
Name | Type | Description |
---|---|---|
event | object | The input field event. |
onInputRulesFile(event)
Handle input rules file.
Name | Type | Description |
---|---|---|
event | object | The input field event. |
onInputTagsFile(event)
Handle input tags file.
Name | Type | Description |
---|---|---|
event | object | The input field event. |
onLoadDICOMFile(event)
Handle DICOM file load.
Name | Type | Description |
---|---|---|
event | object | The onload event. |
onLocalChkChange()
Update dicom links on checkbox change.
- Source
onSaveTags()
Save the tags as a JSON file.
onSeriesLoad(json)
Handle a series QIDO query load.
Name | Type | Description |
---|---|---|
json | Array | JSON array data. |
- Source
onViewGithubHosted()
Handle click on the view github hosted button.
- Source
padOBValue(value) → {Array|Uint8Array}
Pad an input OB value.
Name | Type | Description |
---|---|---|
value | Array | | The input value. |
- Source
The padded input.
- Type:
- Array |
Uint8Array
padZeroTwoDigit(str) → {string}
Pad an input string with a '0' to form a 2 digit one.
Name | Type | Description |
---|---|---|
str | string | The string to pad. |
- Source
The padded string.
- Type:
- string
parseMultipart(arr) → {Array}
Extract each element of a multipart ArrayBuffer.
Name | Type | Description |
---|---|---|
arr | ArrayBuffer | The multipart array. |
- Source
The multipart parts as an array of object as {'Content-Type', ..., data} (depending on header tags).
- Type:
- Array
precisionRound(number, precision) → {number}
Round a float number to a given precision.
Inspired from https://stackoverflow.com/a/49729715/3639892.
Can be a solution to not have trailing zero as when using toFixed or toPrecision. '+number.toFixed(precision)' does not pass all the tests...
Name | Type | Description |
---|---|---|
number | number | The number to round. |
precision | number | The rounding precision. |
- Source
The rounded number.
- Type:
- number
qidoResponseToTable()
Show the QIDO response as a table.
- Source
range(dataAccessor, start, maxIter, increment, blockMaxIter, blockIncrement, reverse1, reverse2) → {object}
Get an iterator for a given range for a one component data.
Using 'maxIter' and not an 'end' index since it fails in some edge cases (for ex coronal2, ie zxy).
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | Zero-based index at which to start the iteration. |
maxIter | number | The maximum number of iterations. |
increment | number | Increment between indicies. |
blockMaxIter | number | Number of applied increment after which blockIncrement is applied. |
blockIncrement | number | Increment after blockMaxIter is reached, the value is from block start to the next block start. |
reverse1 | boolean | If true, loop from end to start. WARN: don't forget to set the value of start as the last index! |
reverse2 | boolean | If true, loop from block end to block start. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
range3d(dataAccessor, start, maxIter, increment, blockMaxIter, blockIncrement, reverse1, reverse2, isPlanar) → {object}
Get an iterator for a given range for a 3 components data.
Using 'maxIter' and not an 'end' index since it fails in some edge cases (for ex coronal2, ie zxy).
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | Zero-based index at which to start the iteration. |
maxIter | number | The maximum number of iterations. |
increment | number | Increment between indicies. |
blockMaxIter | number | Number of applied increment after which blockIncrement is applied. |
blockIncrement | number | Increment after blockMaxIter is reached, the value is from block start to the next block start. |
reverse1 | boolean | If true, loop from end to start. WARN: don't forget to set the value of start as the last index! |
reverse2 | boolean | If true, loop from block end to block start. |
isPlanar | boolean | A flag to know if the data is planar (RRRR...GGGG...BBBB...) or not (RGBRGBRGBRGB...), defaults to false. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
rangeRegion(dataAccessor, start, end, increment, regionSize, regionOffset) → {object}
Get an iterator for a given range with bounds (for a one component data).
Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). |
increment | number | The increment between indicies. |
regionSize | number | The size of the region to iterate through. |
regionOffset | number | The offset between regions. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
rangeRegions(dataAccessor, start, end, increment, regions) → {object}
Get an iterator for a given range with bounds (for a one component data).
Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). |
increment | number | The increment between indicies. |
regions | Array.<Array.<number>> | An array of regions: [off0, size, off1]. |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
replaceFlags(inputStr, values) → {string}
Replace flags in a input string. Flags are keywords surrounded with curly braces in the form: '{v0}, {v1}'.
Name | Type | Description |
---|---|---|
inputStr | string | The input string. |
values | Array.<string> | An array of strings. |
- Source
The result string.
- Type:
- string
var values = ["a", "b"];
var str = "The length is: {v0}. The size is: {v1}";
var res = replaceFlags(str, values);
// "The length is: a. The size is: b"
replaceFlags(inputStr, values) → {string}
Replace flags in a input string. Flags are keywords surrounded with curly braces.
Name | Type | Description |
---|---|---|
inputStr | string | The input string. |
values | object | A object of {value, unit}. |
- Source
The result string.
- Type:
- string
rgbToHex(rgb) → {string}
Convert RGB to its hex equivalent.
Name | Type | Description |
---|---|---|
rgb | RGB | The RGB object as {r,g,b}. |
- Source
A string representing the hex color as '#ab01ef'.
- Type:
- string
runIterator(iter) → {Array}
Run an input iterator and store values.
Name | Type | Description |
---|---|---|
iter | object | The iterator. |
The result array.
- Type:
- Array
saveRules()
Save the rules as a JSON file.
setAppTool(toolNameopt)
Set the app tool.
Name | Type | Attributes | Description |
---|---|---|---|
toolName | string | <optional> | The tool to set. |
- Source
setupAbout()
Setup about line.
- Source
setupBindersCheckboxes()
Setup the binders checkboxes.
- Source
setupData()
Setup the data.
- Source
setupParsers()
Setup the parsers.
- Source
setupTests()
Setup the tests.
- Source
setupToolsCheckboxes()
Setup the tools checkboxes.
- Source
showMessage(text, typeopt)
Show a message.
Name | Type | Attributes | Description |
---|---|---|---|
text | string | The text message. | |
type | string | <optional> | The message type used as css class. |
- Source
showProgress(text)
Show a progress message.
Name | Type | Description |
---|---|---|
text | string | The text message. |
- Source
simpleRange(dataAccessor, start, end, incrementopt) → {object}
Get an simple iterator for a given range for a one component data.
Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
Name | Type | Attributes | Description |
---|---|---|---|
dataAccessor | function | Function to access data. | |
start | number | The start of the range (included). | |
end | number | The end of the range (excluded). | |
increment | number | <optional> | The increment between indicies (default=1). |
- Source
An iterator folowing the iterator and iterable protocol.
- Type:
- object
simpleRange3d(dataAccessor, start, end, increment, isPlanar) → {object}
Get an iterator for a given range for a 3 components data.
Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
Name | Type | Description |
---|---|---|
dataAccessor | function | Function to access data. |
start | number | The start of the range (included). |
end | number | The end of the range (excluded). (end - start) needs to be a multiple of 3... |
increment | number | The increment between indicies (default=1). |
isPlanar | boolean | A flag to know if the data is planar (RRRR...GGGG...BBBB...) or not (RGBRGBRGBRGB...), defaults to false. |
- Source
A 3 components iterator folowing the iterator and iterable protocol, the value is an array of size 3 with each component.
- Type:
- object
sortByPosPatKey(obj) → {object}
Sort an object with pos pat string keys.
Name | Type | Description |
---|---|---|
obj | object | The object to sort. |
- Source
The sorted object.
- Type:
- object
splitAnnotationDivId(divId) → {object}
Split a divId to get dataId and annotationId.
Name | Type | Description |
---|---|---|
divId | string | The divId. |
The data and annotation ID.
- Type:
- object
splitKeyValueString(inputStr) → {object}
Split key/value string: key0=val00&key0=val01&key1=val10 will return
{key0 : [val00, val01], key1 : val1}`.
Name | Type | Description |
---|---|---|
inputStr | string | The string to split. |
- Source
The split string.
- Type:
- object
splitUri(uri) → {object}
Split an input URI: 'root?key0=val00&key0=val01&key1=val10' returns { base : root, query : [ key0 : [val00, val01], key1 : val1 ] } Returns an empty object if the input string is not correct (null, empty...) or if it is not a query string (no question mark).
Name | Type | Description |
---|---|---|
uri | string | The string to split. |
- Source
The split string.
- Type:
- object
srgbToCielab(triplet) → {object}
Convert sRGB to CIE LAB (standard illuminant D65).
Name | Type | Description |
---|---|---|
triplet | RGB | 'sRGB' triplet as {r,g,b}. |
- Source
CIE LAB triplet as {l,a,b}.
- Type:
- object
srgbToCiexyz(triplet) → {Scalar3D}
Convert sRGB to CIE XYZ.
Ref: https://en.wikipedia.org/wiki/SRGB#From_sRGB_to_CIE_XYZ.
Name | Type | Description |
---|---|---|
triplet | RGB | 'sRGB' triplet as {r,g,b}. |
- Source
CIE XYZ triplet as {x,y,z}.
- Type:
- Scalar3D
startsWith(str, search, rawPosopt) → {boolean}
Check if a string starts with the input element.
Name | Type | Attributes | Description |
---|---|---|---|
str | string | The input string. | |
search | string | The searched start. | |
rawPos | number | <optional> | The position in this string at which to begin searching for searchString. Defaults to 0. |
- Source
True if the input string starts with the searched string.
- Type:
- boolean
stringToUint8Array(str) → {Uint8Array}
Convert a string to a Uint8Array.
Name | Type | Description |
---|---|---|
str | string | The string to convert. |
- Source
The Uint8Array.
- Type:
- Uint8Array
tagCompareFunction(a, b) → {number}
Tag compare function.
- Source
The result of the tag comparison, positive for b before a, negative for a before b and zero to keep same order.
- Type:
- number
testSegment(segment, assert, testName)
MaskSegment test: translate to element and back.
Name | Type | Description |
---|---|---|
segment | object | The segment as an object. |
assert | object | The QUnit assert. |
testName | string | The test name. |
testSegmentFrameInfo(frameInfo, assert, testName)
SegmentFrameInfo test: translate to element and back.
Name | Type | Description |
---|---|---|
frameInfo | object | The frameInfo as an object. |
assert | object | The QUnit assert. |
testName | string | The test name. |
testWriteReadDataFromConfig(config, assert, writerRulesopt, outConfigopt)
Test a JSON config: write a DICOM file and read it back.
Name | Type | Attributes | Description |
---|---|---|---|
config | object | A JSON config representing DICOM tags. | |
assert | object | A Qunit assert. | |
writerRules | Object.<string, WriterRule> | <optional> | Optional DICOM writer rules. |
outConfig | object | <optional> | Optional resulting JSON after applying writer rules. |
toMaxFirstThird(i) → {number}
Ramp to lut_range_max minus one on the first third values.
Name | Type | Description |
---|---|---|
i | number | The input index. |
- Source
The lut value.
- Type:
- number
toMaxSecondThird(i) → {number}
Ramp to lut_range_max minus one on the second third values, otherwise return 0 for the first third and lut_range_max minus one for the last third.
Name | Type | Description |
---|---|---|
i | number | The input index. |
- Source
The lut value.
- Type:
- number
toMaxThirdThird(i) → {number}
Ramp to lut_range_max minus one on the last third values, otherwise return 0.
Name | Type | Description |
---|---|---|
i | number | The input index. |
- Source
The lut value.
- Type:
- number
toStringId(arr, dimsopt) → {string}
Get a string id from array values in the form of: '#0-1_#1-2'.
Name | Type | Attributes | Description |
---|---|---|---|
arr | Array | The input array. | |
dims | Array.<number> | <optional> | Optional list of dimensions to use. |
- Source
The string id.
- Type:
- string
uint8ArrayPush(arr, value) → {Uint8Array}
Push a value at the end of an input Uint8Array.
Name | Type | Description |
---|---|---|
arr | Array | | The input array. |
value | Array | | The value to push. |
- Source
The new array.
- Type:
- Uint8Array
uint8ArrayToString(arr) → {string}
Convert a Uint8Array to a string.
Name | Type | Description |
---|---|---|
arr | Uint8Array | The array to convert. |
- Source
The array as string.
- Type:
- string
uintLabToLab(triplet) → {object}
Unsigned int CIE LAB value ([0, 65535]) to CIE LAB value (L: [0, 100], a: [-128, 127], b: [-128, 127]).
Name | Type | Description |
---|---|---|
triplet | object | CIE LAB triplet as {l,a,b} with unsigned range. |
- Source
CIE LAB triplet as {l,a,b} with CIE LAB range.
- Type:
- object
updateDataList(datalist)
Update the data list of the data runner.
Name | Type | Description |
---|---|---|
datalist | Array | The new data list. |
- Source
v01Tov02DrawingsAndDetails(inputDrawings) → {object}
Convert drawings from v0.1 to v0.2:
- v0.1: text on its own,
- v0.2: text as part of label.
Name | Type | Description |
---|---|---|
inputDrawings | Array | An array of drawings. |
- Source
The converted drawings.
- Type:
- object
v02Tov03Drawings(drawings) → {object}
Convert drawings from v0.2 to v0.3:
- v0.2: one layer per slice/frame,
- v0.3: one layer, one group per slice.
setDrawing
expects the full stage.
Name | Type | Description |
---|---|---|
drawings | Array | An array of drawings. |
- Source
The layer with the converted drawings.
- Type:
- object
v02Tov03DrawingsDetails(details) → {object}
Convert drawing details from v0.2 to v0.3:
- v0.2: array [nslices][nframes] with all,
- v0.3: simple array of objects referenced by draw ids.
Name | Type | Description |
---|---|---|
details | Array | An array of drawing details. |
- Source
The converted drawings.
- Type:
- object
v03Tov04DrawingsDetails(details) → {object}
Convert drawing details from v0.3 to v0.4:
- v0.3: properties at group root,
- v0.4: properties in group meta object.
Name | Type | Description |
---|---|---|
details | Array | An array of drawing details. |
- Source
The converted drawings.
- Type:
- object
v04Tov05Data(data) → {object}
Convert drawing from v0.4 to v0.5:
- v0.4: position as object,
- v0.5: position as array.
Name | Type | Description |
---|---|---|
data | object | An array of drawing. |
- Source
The converted drawings.
- Type:
- object
v04Tov05Drawings(inputDrawings) → {object}
Convert drawing from v0.4 to v0.5:
- v0.4: draw id as 'slice-0_frame-1',
- v0.5: draw id as '#2-0_#3-1'.
Name | Type | Description |
---|---|---|
inputDrawings | object | An array of drawing. |
- Source
The converted drawings.
- Type:
- object
validateAnchorPosition(stageSize, anchor) → {boolean}
Validate an anchor position.
Name | Type | Description |
---|---|---|
stageSize | Scalar2D | The stage size {x,y}. |
anchor | Konva. | The anchor to evaluate. |
- Source
True if the position was corrected.
- Type:
- boolean
validateWindowWidth(value) → {number}
Validate an input window width.
Name | Type | Description |
---|---|---|
value | number | The value to test. |
- Source
A valid window width.
- Type:
- number
viewerSetup()
Setup simple dwv app.
- Source
ybrToRgb(y, cb, cr) → {RGB}
Convert YBR to RGB.
Ref:
Name | Type | Description |
---|---|---|
y | number | The Y component. |
cb | number | The Cb component. |
cr | number | The Cr component. |
- Source
RGB equivalent as {r,g,b}.
- Type:
- RGB
Type Definitions
DataElements
- Object.<string, DataElement>
DataElements
List of DICOM data elements indexed via a 8 character string formed from the group and element numbers.
- Object.<string, DataElement>
- Source
DataElements
- Object.<string, DataElement>
- Source
DataElements
- Object.<string, DataElement>
- Source
DataViewConfigs
List of ViewConfigs indexed by dataIds.
- Object.<string, Array.<ViewConfig>>
- Source
TypedArray
List of compatible typed arrays.
- Uint8Array |
Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array
- Source
alphaFn(value, index) → {number}
Name | Type | Description |
---|---|---|
value | Array.<number> | | The pixel value. |
index | number | The values' index. |
The opacity of the input value.
- Type:
- number
alphaFn(value, index) → {number}
Name | Type | Description |
---|---|---|
value | Array.<number> | | The pixel value. |
index | number | The values' index. |
The opacity of the input value.
- Type:
- number
alphaFn(value, index) → {number}
Name | Type | Description |
---|---|---|
value | Array.<number> | | The pixel value. |
index | number | The values' index. |
- Source
The opacity of the input value.
- Type:
- number
compareFn(a, b) → {number}
Name | Type | Description |
---|---|---|
a | object | The first object. |
b | object | The first object. |
- Source
0 to sort a after b, <0 to sort a before b, 0 to not change order.
- Type:
- number
eventFn(event)
Name | Type | Description |
---|---|---|
event | object | The event. |
- Source
eventFn(event)
Name | Type | Description |
---|---|---|
event | object | The event. |
- Source
eventFn(event)
Name | Type | Description |
---|---|---|
event | object | The event. |
eventFn(event)
Name | Type | Description |
---|---|---|
event | object | The event. |
eventFn(event)
Name | Type | Description |
---|---|---|
event | object | The event. |
- Source
testFn(node) → {boolean}
Name | Type | Description |
---|---|---|
node | Konva. | The node. |
- Source
True if the node passes the test.
- Type:
- boolean