test

dwv. test

Source:

Just used for tests.

Methods

(static) checkIterator(assert, getIter, theoValues, name)

Source:

Check iter.

Parameters:
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.

(static) compare(jsonTags, dicomElements, name, comparator)

Source:

Compare JSON tags and DICOM elements

Parameters:
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).

(static) compareImageAndBuffer(image, size, buffer, rsi) → {object}

Source:

Compare an image and a buffer.

Parameters:
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.

Returns:

Statistics of the value and rescaled value differences.

Type
object

(static) generate()

Source:

Generate DICOM data

(static) launchJSONLint()

Source:

open JSONLint to check the rules

(static) launchJSONlint()

Source:

Open JSONLint to check the tags.

(static) onDOMContentLoadedColourmap()

Source:

Last minute.

(static) onDOMContentLoadedGenerator()

Source:

Last minute.

(static) onDOMContentLoadedPacs()

Source:

Last minute

(static) onDOMContentLoadedSynthData()

Source:

Last minute.

(static) onDOMContentLoadedViewer()

Source:

Last minute.

(static) onGenerate()

Source:

Generate DICOM data

(static) onInputDICOMFile(event)

Source:

handle input DICOM file

Parameters:
Name Type Description
event object

The input field event.

(static) onInputImageFiles(event)

Source:

Handle input image file

Parameters:
Name Type Description
event object

The input field event.

(static) onInputRulesFile(event)

Source:

handle input rules file

Parameters:
Name Type Description
event object

The input field event.

(static) onInputTagsFile(event)

Source:

Handle input tags file.

Parameters:
Name Type Description
event object

The input field event.

(static) onSaveTags()

Source:

Save the tags as a JSON file.

(static) runIterator(iter) → {Array}

Source:

Run an input iterator and store values.

Parameters:
Name Type Description
iter object

The iterator.

Returns:

The result array.

Type
Array

(static) sauceTest(caps)

Source:
See:

Launch a sauce GUI test.

Parameters:
Name Type Description
caps object

Desired capabilities for the webdriver. Minimum of {'browserName', 'version', 'platform'}.

(static) saveRules()

Source:

Save the rules as a JSON file.

(static) testWriteReadDataFromConfig(config, assert)

Source:

Test a JSON config: write a DICOM file and read it back.

Parameters:
Name Type Description
config object

A JSON config representing DICOM tags.

assert object

A Qunit assert.

(static) toString(obj) → {string}

Source:

Get a string representation of an object. TypedArray.toString can return '[object Uint8Array]' on old browsers (such as in PhantomJs).

Parameters:
Name Type Description
obj object

The input object

Returns:

The string.

Type
string

(static) viewerSetup()

Source:

Setup simple dwv app.