Skip to content

Commit

Permalink
fix: workers 2.0 (#1535)
Browse files Browse the repository at this point in the history
* wip

* try to fix workers
  • Loading branch information
sedghi authored Oct 31, 2024
1 parent 4fa4b3d commit deedc50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/dicomImageLoader/src/imageLoader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import { default as wadouri } from './wadouri/index';
import { default as wadors } from './wadors/index';
import { default as init } from './init';
import { default as init } from '../init';
import { default as convertColorSpace } from './convertColorSpace';
import { default as createImage } from './createImage';
import { default as decodeJPEGBaseline8BitColor } from './decodeJPEGBaseline8BitColor';
Expand Down
2 changes: 1 addition & 1 deletion packages/dicomImageLoader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import { default as wadouri } from './imageLoader/wadouri/index';
import { default as wadors } from './imageLoader/wadors/index';
import { default as init } from './imageLoader/init';
import { default as init } from './init';
import { default as convertColorSpace } from './imageLoader/convertColorSpace';
import { default as createImage } from './imageLoader/createImage';
import { default as decodeJPEGBaseline8BitColor } from './imageLoader/decodeJPEGBaseline8BitColor';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { setOptions, getOptions } from './internal/index';
import type { LoaderOptions } from '../types';
import registerLoaders from './registerLoaders';
import { setOptions } from './imageLoader/internal/index';
import type { LoaderOptions } from './types';
import registerLoaders from './imageLoader/registerLoaders';
import { getWebWorkerManager } from '@cornerstonejs/core';

const workerFn = () => {
const instance = new Worker(
new URL('../decodeImageFrameWorker.js', import.meta.url),
{ type: 'module' }
);
const path = new URL('./decodeImageFrameWorker.js', import.meta.url);
const instance = new Worker(path, { type: 'module' });
return instance;
};

Expand Down

0 comments on commit deedc50

Please sign in to comment.