public/cornerstoneWADOImageLoaderWebWorker.js
/**
 * Function to control loading and initializing the codecs
 * @param config
 */
Function to control loading and initializing the codecs
@param config
Function to control loading and initializing the codecs @param config
function loadCodecs(config) {
  if (codecsLoaded) {
    return;
  }
  self.importScripts(config.decodeTask.codecsPath);
  codecsLoaded = true;
  if (config.decodeTask.initializeCodecsOnStartup) {
    (0, _decodeJPEG.initializeJPEG2000)(config.decodeTask);
    (0, _decodeJPEGLS.initializeJPEGLS)(config.decodeTask);
  }
}
function loadCodecs ( config ) { if ( codecsLoaded ) { return ; } self . importScripts ( config . decodeTask . codecsPath ) ; codecsLoaded = true ; if ( config . decodeTask . initializeCodecsOnStartup ) { ( 0 , _decodeJPEG . initializeJPEG2000 ) ( config . decodeTask ) ; ( 0 , _decodeJPEGLS . initializeJPEGLS ) ( config . decodeTask ) ; } }
Function to control loading and initializing the codecs
 @param config
Function to control loading and initializing the codecs @param config
// prevent loading codecs more than once // Load the codecs // console.time('loadCodecs'); // console.timeEnd('loadCodecs'); // Initialize the codecs // console.time('initializeCodecs'); // console.timeEnd('initializeCodecs');