UNPKG

cornerstone-wado-image-loader

Version:
4,383 lines (969 loc) 48.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Global - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> <script src="scripts/nav.js" defer></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav > <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#addTask">addTask</a></li><li><a href="global.html#arrayBufferToString">arrayBufferToString</a></li><li><a href="global.html#cacheSizeInBytes">cacheSizeInBytes</a></li><li><a href="global.html#cancelTask">cancelTask</a></li><li><a href="global.html#decodeAsync">decodeAsync</a></li><li><a href="global.html#framesAreFragmented">framesAreFragmented</a></li><li><a href="global.html#getMinMax">getMinMax</a></li><li><a href="global.html#getNumberString">getNumberString</a></li><li><a href="global.html#getNumberValues">getNumberValues</a></li><li><a href="global.html#getStatistics">getStatistics</a></li><li><a href="global.html#getTransferSyntaxForContentType">getTransferSyntaxForContentType</a></li><li><a href="global.html#getUncompressedImageFrame">getUncompressedImageFrame</a></li><li><a href="global.html#getValue">getValue</a></li><li><a href="global.html#handleMessageFromWorker">handleMessageFromWorker</a></li><li><a href="global.html#handler">handler</a></li><li><a href="global.html#initialize">initialize</a></li><li><a href="global.html#loadCodecs">loadCodecs</a></li><li><a href="global.html#loadWebWorkerTask">loadWebWorkerTask</a></li><li><a href="global.html#registerLoaders">registerLoaders</a></li><li><a href="global.html#registerTaskHandler">registerTaskHandler</a></li><li><a href="global.html#setPixelDataType">setPixelDataType</a></li><li><a href="global.html#setTaskPriority">setTaskPriority</a></li><li><a href="global.html#spawnWebWorker">spawnWebWorker</a></li><li><a href="global.html#startTaskOnWebWorker">startTaskOnWebWorker</a></li><li><a href="global.html#terminate">terminate</a></li><li><a href="global.html#unpackBinaryFrame">unpackBinaryFrame</a></li></ul> </nav> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="cacheSizeInBytes"><span class="type-signature"></span>cacheSizeInBytes<span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadouri_dataSetCacheManager.js.html">imageLoader/wadouri/dataSetCacheManager.js</a>, <a href="imageLoader_wadouri_dataSetCacheManager.js.html#line10">line 10</a> </li></ul></dd> </dl> <div class="description usertext"> This object supports loading of DICOM P10 dataset from a uri and caching it so it can be accessed by the caller. This allows a caller to access the datasets without having to go through cornerstone's image loader mechanism. One reason a caller may need to do this is to determine the number of frames in a multiframe sop instance so it can create the imageId's correctly. </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="addTask"><span class="type-signature"></span>addTask<span class="signature">(taskType, data, priority, transferList)</span><span class="type-signature"> &rarr; {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line241">line 241</a> </li></ul></dd> </dl> <div class="description usertext"> Function to add a decode task to be performed </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>taskType</code></td> <td class="type"> </td> <td class="default"> </td> <td class="description last">the taskType for this task</td> </tr> <tr> <td class="name"><code>data</code></td> <td class="type"> </td> <td class="default"> </td> <td class="description last">data specific to the task</td> </tr> <tr> <td class="name"><code>priority</code></td> <td class="type"> </td> <td class="default"> <code>0</code> </td> <td class="description last">optional priority of the task (defaults to 0), > 0 is higher, < 0 is lower</td> </tr> <tr> <td class="name"><code>transferList</code></td> <td class="type"> </td> <td class="default"> </td> <td class="description last">optional array of data to transfer to web worker</td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="arrayBufferToString"><span class="type-signature"></span>arrayBufferToString<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_decodeJPEGBaseline8BitColor.js.html">imageLoader/decodeJPEGBaseline8BitColor.js</a>, <a href="imageLoader_decodeJPEGBaseline8BitColor.js.html#line7">line 7</a> </li></ul></dd> </dl> <div class="description usertext"> Special decoder for 8 bit jpeg that leverages the browser's built in JPEG decoder for increased performance </div> <h4 class="name" id="cancelTask"><span class="type-signature"></span>cancelTask<span class="signature">(taskId, reason)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line325">line 325</a> </li></ul></dd> </dl> <div class="description usertext"> Cancels a queued task and rejects </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>taskId</code></td> <td class="type"> </td> <td class="description last">the taskId to cancel</td> </tr> <tr> <td class="name"><code>reason</code></td> <td class="type"> </td> <td class="description last">optional reason the task was rejected</td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> boolean - true on success, false if taskId not found </div> <h4 class="name" id="decodeAsync"><span class="type-signature">(async) </span>decodeAsync<span class="signature">(compressedImageFrame, imageInfo)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="shared_decoders_decodeJPEGBaseline12Bit-wasm-not-yet-working.js.html">shared/decoders/decodeJPEGBaseline12Bit-wasm-not-yet-working.js</a>, <a href="shared_decoders_decodeJPEGBaseline12Bit-wasm-not-yet-working.js.html#line42">line 42</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>compressedImageFrame</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>imageInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>signed</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last">-</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="decodeAsync"><span class="type-signature">(async) </span>decodeAsync<span class="signature">(compressedImageFrame, imageInfo)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="shared_decoders_decodeJPEGBaseline8Bit.js.html">shared/decoders/decodeJPEGBaseline8Bit.js</a>, <a href="shared_decoders_decodeJPEGBaseline8Bit.js.html#line42">line 42</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>compressedImageFrame</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>imageInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>signed</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last">-</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="decodeAsync"><span class="type-signature">(async) </span>decodeAsync<span class="signature">(compressedImageFrame, imageInfo)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="shared_decoders_decodeJPEGLS.js.html">shared/decoders/decodeJPEGLS.js</a>, <a href="shared_decoders_decodeJPEGLS.js.html#line52">line 52</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>compressedImageFrame</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>imageInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>signed</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last">(pixelRepresentation === 1)</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="framesAreFragmented"><span class="type-signature"></span>framesAreFragmented<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadouri_getEncapsulatedImageFrame.js.html">imageLoader/wadouri/getEncapsulatedImageFrame.js</a>, <a href="imageLoader_wadouri_getEncapsulatedImageFrame.js.html#line7">line 7</a> </li></ul></dd> </dl> <div class="description usertext"> Function to deal with extracting an image frame from an encapsulated data set. </div> <h4 class="name" id="getMinMax"><span class="type-signature"></span>getMinMax<span class="signature">(storedPixelData)</span><span class="type-signature"> &rarr; {Object}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="shared_getMinMax.js.html">shared/getMinMax.js</a>, <a href="shared_getMinMax.js.html#line7">line 7</a> </li></ul></dd> </dl> <div class="description usertext"> Calculate the minimum and maximum values in an Array </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>storedPixelData</code></td> <td class="type"> <span class="param-type">Array.&lt;Number></span> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id="getNumberString"><span class="type-signature"></span>getNumberString<span class="signature">(element, index<span class="signature-attributes">opt</span>, defaultValue<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadors_metaData_getNumberString.js.html">imageLoader/wadors/metaData/getNumberString.js</a>, <a href="imageLoader_wadors_metaData_getNumberString.js.html#line11">line 11</a> </li></ul></dd> </dl> <div class="description usertext"> Returns the first string value as a Javascript number </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> </td> <td class="attributes"> </td> <td class="description last">The javascript object for the specified element in the metadata</td> </tr> <tr> <td class="name"><code>index</code></td> <td class="type"> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">the index of the value in a multi-valued element, default is 0</td> </tr> <tr> <td class="name"><code>defaultValue</code></td> <td class="type"> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The default value to return if the element does not exist</td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="getNumberValues"><span class="type-signature"></span>getNumberValues<span class="signature">(element, minimumLength<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadors_metaData_getNumberValues.js.html">imageLoader/wadors/metaData/getNumberValues.js</a>, <a href="imageLoader_wadors_metaData_getNumberValues.js.html#line8">line 8</a> </li></ul></dd> </dl> <div class="description usertext"> Returns the values as an array of javascript numbers </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> </td> <td class="attributes"> </td> <td class="description last">The javascript object for the specified element in the metadata</td> </tr> <tr> <td class="name"><code>minimumLength</code></td> <td class="type"> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">the minimum number of values</td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="getStatistics"><span class="type-signature"></span>getStatistics<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line345">line 345</a> </li></ul></dd> </dl> <div class="description usertext"> Function to return the statistics on running web workers </div> <h5>Returns:</h5> <div class="param-desc"> object containing statistics </div> <h4 class="name" id="getTransferSyntaxForContentType"><span class="type-signature"></span>getTransferSyntaxForContentType<span class="signature">(contentType)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadors_loadImage.js.html">imageLoader/wadors/loadImage.js</a>, <a href="imageLoader_wadors_loadImage.js.html#line10">line 10</a> </li></ul></dd> </dl> <div class="description usertext"> Helper method to extract the transfer-syntax from the response of the server. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>contentType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The value of the content-type header as returned by the WADO-RS server.</td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> The transfer-syntax as announced by the server, or Implicit Little Endian by default. </div> <h4 class="name" id="getUncompressedImageFrame"><span class="type-signature"></span>getUncompressedImageFrame<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadouri_getUncompressedImageFrame.js.html">imageLoader/wadouri/getUncompressedImageFrame.js</a>, <a href="imageLoader_wadouri_getUncompressedImageFrame.js.html#line7">line 7</a> </li></ul></dd> </dl> <div class="description usertext"> Function to deal with extracting an image frame from an encapsulated data set. </div> <h4 class="name" id="getValue"><span class="type-signature"></span>getValue<span class="signature">(element, index<span class="signature-attributes">opt</span>, defaultValue<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadors_metaData_getValue.js.html">imageLoader/wadors/metaData/getValue.js</a>, <a href="imageLoader_wadors_metaData_getValue.js.html#line9">line 9</a> </li></ul></dd> </dl> <div class="description usertext"> Returns the raw value </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> </td> <td class="attributes"> </td> <td class="description last">The javascript object for the specified element in the metadata</td> </tr> <tr> <td class="name"><code>index</code></td> <td class="type"> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">the index of the value in a multi-valued element, default is 0</td> </tr> <tr> <td class="name"><code>defaultValue</code></td> <td class="type"> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The default value to return if the element does not exist</td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="handleMessageFromWorker"><span class="type-signature"></span>handleMessageFromWorker<span class="signature">(msg)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line104">line 104</a> </li></ul></dd> </dl> <div class="description usertext"> Function to handle a message from a web worker </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>msg</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="handler"><span class="type-signature"></span>handler<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_decodeTask.js.html">webWorker/decodeTask.js</a>, <a href="webWorker_decodeTask.js.html#line35">line 35</a> </li></ul></dd> </dl> <div class="description usertext"> Task handler function </div> <h4 class="name" id="initialize"><span class="type-signature"></span>initialize<span class="signature">(configObject)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line171">line 171</a> </li></ul></dd> </dl> <div class="description usertext"> Initialization function for the web worker manager - spawns web workers </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>configObject</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="initialize"><span class="type-signature"></span>initialize<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_decodeTask.js.html">webWorker/decodeTask.js</a>, <a href="webWorker_decodeTask.js.html#line26">line 26</a> </li></ul></dd> </dl> <div class="description usertext"> Task initialization function </div> <h4 class="name" id="initialize"><span class="type-signature"></span>initialize<span class="signature">(data)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_webWorker.js.html">webWorker/webWorker.js</a>, <a href="webWorker_webWorker.js.html#line14">line 14</a> </li></ul></dd> </dl> <div class="description usertext"> Initialization function that loads additional web workers and initializes them </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>data</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="loadCodecs"><span class="type-signature"></span>loadCodecs<span class="signature">(config)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_decodeTask.js.html">webWorker/decodeTask.js</a>, <a href="webWorker_decodeTask.js.html#line13">line 13</a> </li></ul></dd> </dl> <div class="description usertext"> Function to control loading and initializing the codecs </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>config</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="loadWebWorkerTask"><span class="type-signature"></span>loadWebWorkerTask<span class="signature">(sourcePath, taskConfig)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line208">line 208</a> </li></ul></dd> </dl> <div class="description usertext"> dynamically loads a web worker task </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>sourcePath</code></td> <td class="type"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>taskConfig</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="loadWebWorkerTask"><span class="type-signature"></span>loadWebWorkerTask<span class="signature">(data)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_webWorker.js.html">webWorker/webWorker.js</a>, <a href="webWorker_webWorker.js.html#line74">line 74</a> </li></ul></dd> </dl> <div class="description usertext"> Function to load a new web worker task with updated configuration </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>data</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="registerLoaders"><span class="type-signature"></span>registerLoaders<span class="signature">(cornerstone)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_registerLoaders.js.html">imageLoader/registerLoaders.js</a>, <a href="imageLoader_registerLoaders.js.html#line10">line 10</a> </li></ul></dd> </dl> <div class="description usertext"> Register the WADO-URI and WADO-RS image loaders and metaData providers with an instance of Cornerstone Core. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cornerstone</code></td> <td class="type"> </td> <td class="description last">The Cornerstone Core library to register the image loaders with</td> </tr> </tbody> </table> <h4 class="name" id="registerTaskHandler"><span class="type-signature"></span>registerTaskHandler<span class="signature">(taskHandler)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="webWorker_webWorker.js.html">webWorker/webWorker.js</a>, <a href="webWorker_webWorker.js.html#line54">line 54</a> </li></ul></dd> </dl> <div class="description usertext"> Function exposed to web worker tasks to register themselves </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>taskHandler</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="setPixelDataType"><span class="type-signature"></span>setPixelDataType<span class="signature">(imageFrame)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_createImage.js.html">imageLoader/createImage.js</a>, <a href="imageLoader_createImage.js.html#line56">line 56</a> </li></ul></dd> </dl> <div class="description usertext"> Helper function to set pixel data to the right typed array. This is needed because web workers can transfer array buffers but not typed arrays </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>imageFrame</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h4 class="name" id="setTaskPriority"><span class="type-signature"></span>setTaskPriority<span class="signature">(taskId, priority)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line292">line 292</a> </li></ul></dd> </dl> <div class="description usertext"> Changes the priority of a queued task </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>taskId</code></td> <td class="type"> </td> <td class="default"> </td> <td class="description last">the taskId to change the priority of</td> </tr> <tr> <td class="name"><code>priority</code></td> <td class="type"> </td> <td class="default"> <code>0</code> </td> <td class="description last">priority of the task (defaults to 0), > 0 is higher, < 0 is lower</td> </tr> </tbody> </table> <h5>Returns:</h5> <div class="param-desc"> boolean - true on success, false if taskId not found </div> <h4 class="name" id="spawnWebWorker"><span class="type-signature"></span>spawnWebWorker<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line133">line 133</a> </li></ul></dd> </dl> <div class="description usertext"> Spawns a new web worker </div> <h4 class="name" id="startTaskOnWebWorker"><span class="type-signature"></span>startTaskOnWebWorker<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line55">line 55</a> </li></ul></dd> </dl> <div class="description usertext"> Function to start a task on a web worker </div> <h4 class="name" id="terminate"><span class="type-signature"></span>terminate<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_webWorkerManager.js.html">imageLoader/webWorkerManager.js</a>, <a href="imageLoader_webWorkerManager.js.html#line195">line 195</a> </li></ul></dd> </dl> <div class="description usertext"> Terminate all running web workers. </div> <h4 class="name" id="unpackBinaryFrame"><span class="type-signature"></span>unpackBinaryFrame<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="imageLoader_wadouri_unpackBinaryFrame.js.html">imageLoader/wadouri/unpackBinaryFrame.js</a>, <a href="imageLoader_wadouri_unpackBinaryFrame.js.html#line10">line 10</a> </li></ul></dd> </dl> <div class="description usertext"> Function to deal with unpacking a binary frame </div> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. </footer> <script>prettyPrint();</script> <script src="scripts/polyfill.js"></script> <script src="scripts/linenumber.js"></script> </body> </html>