Skip to content

Commit

Permalink
fix: nifti 8 bit (#1706)
Browse files Browse the repository at this point in the history
* fix: nifti 8 bit

* fix examples
  • Loading branch information
sedghi authored Dec 12, 2024
1 parent 844eeb3 commit 7579285
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 90 deletions.
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-typescript": "^11.1.6",
"@rspack/cli": "^1.1.4",
"@rspack/core": "^1.1.4",
"@rspack/cli": "^1.1.6",
"@rspack/core": "^1.1.6",
"@types/dom-webcodecs": "^0.1.11",
"@types/emscripten": "^1.39.6",
"@types/jasmine": "^4.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/examples/stackProgressive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@ async function run() {
SeriesInstanceUID:
'1.3.6.1.4.1.9590.100.1.2.160160590111755920740089886004263812825',
wadoRsRoot:
getLocalUrl() || 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
getLocalUrl() || 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb',
});

const imageIdsCt = await createImageIdsAndCacheMetaData({
StudyInstanceUID: '1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1',
SeriesInstanceUID: '1.3.6.1.4.1.25403.345050719074.3824.20170125113545.4',
wadoRsRoot:
getLocalUrl() || 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
getLocalUrl() || 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb',
});

// Instantiate a rendering engine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ function _determineDataType(

switch (BitsAllocated) {
case 8:
if (signed) {
throw new Error(
'8 Bit signed images are not yet supported by this plugin.'
);
}
return 'Uint8Array';

case 16:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ function handleNiftiHeader(data): {
}
}

async function fetchAndAllocateNiftiVolume(volumeId) {
const niftiURL = volumeId.substring(NIFTI_LOADER_SCHEME.length + 1);
async function fetchAndAllocateNiftiVolume(url) {
const niftiURL = url;

const onProgress = (loaded, total) => {
const data = { volumeId, loaded, total };
const data = { volumeId: url, loaded, total };
triggerEvent(eventTarget, Events.NIFTI_VOLUME_PROGRESS, { data });
};

const onLoad = () => {
const data = { volumeId };
const data = { volumeId: url };
triggerEvent(eventTarget, Events.NIFTI_VOLUME_LOADED, { data });
};

Expand Down
2 changes: 1 addition & 1 deletion packages/tools/examples/volumeProgressive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async function run() {
StudyInstanceUID: '1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1',
SeriesInstanceUID: '1.3.6.1.4.1.25403.345050719074.3824.20170125113545.4',
wadoRsRoot:
getLocalUrl() || 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
getLocalUrl() || 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb',
});

// Instantiate a rendering engine
Expand Down
1 change: 0 additions & 1 deletion packages/tools/src/tools/annotation/RectangleROITool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ class RectangleROITool extends AnnotationTool {
this.editData.hasMoved = true;

const enabledElement = getEnabledElement(element);
const { renderingEngine } = enabledElement;

triggerAnnotationRenderForViewportIds(viewportIdsToRender);
};
Expand Down
80 changes: 5 additions & 75 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5514,111 +5514,51 @@
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz#f672f6508f090fc73f08ba40ff76c20b57424778"
integrity sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.1.4.tgz#a4ed8348875c438dd72140f32ebd6c2eaed53065"
integrity sha512-mSN9OWvenbD125THkj3nFOlJCk5o44C8uc0YH7gK1uR77g98USiC/4eSWXKqP+sRfDBplQEzannuPrBW1nPimQ==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.1.6.tgz#eb5a219caaf43e87b8077083692efc3a6491da7b"
integrity sha512-x9dxm2yyiMuL1FBwvWNNMs2/mEUJmRoSRgYb8pblR7HDaTRORrjBFCqhaYlGyAqtQaeUy7o2VAQlE0BavIiFYA==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.1.4.tgz#8948b0afc6083ce34f29411fa475cc71766cb189"
integrity sha512-ECmcTJecXwqhqqpOjfjIcwDp8UqJ3D1Crc2COG+wUfwejtbqs9twUTaufZz7U7xna+oyfJ4GRNSKS9xs4N2kPQ==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.1.6.tgz#18c44135670857242c5dc96de2c63952050c934a"
integrity sha512-o0seilveftGiDjy3VPxug20HmAgYyQbNEuagR3i93/t/PT/eWXHnik+C1jjwqcivZL1Zllqvy4tbZw393aROEQ==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.4.tgz#9b2541338fb3c29d73bfa729cf6796ddef39e38e"
integrity sha512-QVRFV6+z1DopeGn8rLRbBNrWXuBvp7J19lTtvx9F5mItzTiBVHmNqFt31namm59xkhHJ3leng7l2F39qcOMOIA==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.6.tgz#ed132a3c3f7d34f9fea247c217dac12758785549"
integrity sha512-4atnoknJx/c3KaQElsMIxHMpPf2jcRRdWsH/SdqJIRSrkWWakMK9Yv4TFwH680I4HDTMf1XLboMVScHzW8e+Mg==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.4.tgz#bf77112e623e39ff2387fa602915a26c5a8af800"
integrity sha512-UCateQWfEpEyFOC/tkuicXpIm81s5DavcwKjX3wwh1JB/KO6UxGHK8F75BV4K3Coo/UEiNCvL8xrB7eDjMDwYg==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.6.tgz#0bb92f5af5b398293c9935b5b3ec6c5acb1d1791"
integrity sha512-7QMtwUtgFpt3/Y3/X18fSyN+kk4H8ZnZ8tDzQskVWc/j2AQYShZq56XQYqrhClzwujcCVAHauIQ2eiuJ2ASGag==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.4.tgz#ce497a785a5fb4f25263f05bd307e6611f4e340b"
integrity sha512-Nz5Bt1PDxebVRU321h9AGkLRQL5n9Xgt+rluWAXLVtyxM9aPavmvu1n6/G9stXwQdnUVrZIUs7EzhIhWBe5R/A==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.6.tgz#c4ef0d87ccae53243689c26c7441b94988227468"
integrity sha512-MTjDEfPn4TwHoqs5d5Fck06kmXiTHZctGIcRVfrpg0RK0r1NLEHN+oosavRZ9c9H70f34+NmcHk+/qvV4c8lWg==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.4.tgz#0d99e9790441b52cdbdeb154e0f43f92ec196b21"
integrity sha512-1XG795a+M4vE7JLyeDa1oktr4WU/I5IQ9d8Vk3PVtF59IxnKpjOb3vdGhXP7Ke2zWP6C2YQzWotez6AbO3uWeA==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.6.tgz#5800e662c05f259ae7647979bb81c076ea5afffb"
integrity sha512-LqDw7PTVr/4ZuGA0izgDQfamfr72USFHltR1Qhy2YVC3JmDmhG/pQi13LHcOLVaGH1xoeyCmEPNJpVizzDxSjg==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.4.tgz#9cdc7b498cdf8ccd642b47a3a10053b1ac431990"
integrity sha512-1hXOgHxnrBmjBNUluy9MbFMQi4lnAS199JD5UHRc2mx5i+D8cjAiBsWHzIcK4xzsxu2IYgVGsJcdIA8/zV/PVQ==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.6.tgz#d0f93bfa6ec1352f112710aa60f9c7a20a12490c"
integrity sha512-RHApLM93YN0WdHpS35u2cm7VCqZ8Yg3CrNRL16VJtyT9e6MBqeScoe4XIgIWKPm7edFyedYAjLX0wQOApwfjkg==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.1.4.tgz#5056847af7b9abf94a4658ff36b11d8b55b5522d"
integrity sha512-Jfq6gF5QKOYZsgDYRx+fWipDHmtHxq6jniws1WAE8F5w1qIt/dAHzW3a6+3VwCih9lQEEH3Rimy/ECB0oergng==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.1.6.tgz#bf7ea7c23b39ae6ddf16e51e0c88110f04f16868"
integrity sha512-Y6lx4q0eJawRfMPBo/AclTJAPTZ325DSPFBQJB3TnWh9Z2X7P7pQcYc8PHDmfDuYRIdg5WRsQRvVxihSvF7v8w==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.4.tgz#11195f042eb9108d59b0cf8ba7bf5f61c2058bfe"
integrity sha512-d9HUGVfNFhB+r32kDPkzHeMmgwemTFsDymnWJUgUrojzTJ326JrDmEXVeCnAHfwBSC9w4/mp4H+4iGhIdKSo9w==

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.6.tgz#6e1a678b4a57efbbf3fe7f89c63d5bb4917aac1d"
integrity sha512-UuCsfhC/yNuU7xLASOxNXcmsXi2ZvBX14GkxvcdChw6q7IIGNYUKXo1zgR8C1PE/6qDSxmLxbRMS+71d0H3HQg==

"@rspack/[email protected]":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.1.4.tgz#8536ab9949e0869a1087ec9f7b1b2dc52c7b5bf6"
integrity sha512-XdR/4DACpLqNjxEw+ikg5FN2dQbOAxj7fDlndNio0l+m8ThPiIsetkJ2FNSlxt/K4SVnIrwAkhE5kabVNKR4EA==
optionalDependencies:
"@rspack/binding-darwin-arm64" "1.1.4"
"@rspack/binding-darwin-x64" "1.1.4"
"@rspack/binding-linux-arm64-gnu" "1.1.4"
"@rspack/binding-linux-arm64-musl" "1.1.4"
"@rspack/binding-linux-x64-gnu" "1.1.4"
"@rspack/binding-linux-x64-musl" "1.1.4"
"@rspack/binding-win32-arm64-msvc" "1.1.4"
"@rspack/binding-win32-ia32-msvc" "1.1.4"
"@rspack/binding-win32-x64-msvc" "1.1.4"

"@rspack/[email protected]":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.1.6.tgz#d2773fd27efd7d0b3df01d69f9fbcf9b620d817a"
Expand All @@ -5634,10 +5574,10 @@
"@rspack/binding-win32-ia32-msvc" "1.1.6"
"@rspack/binding-win32-x64-msvc" "1.1.6"

"@rspack/cli@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/cli/-/cli-1.1.4.tgz#04be847cf1cc1f543d8108ad9f1513cdfdea78f6"
integrity sha512-3rmJDfvDBd5cxsjubYCvB7RDmtsk2gyItOwVkpH4OnNSB31fkFC4Dmm4WjvGG/SMMTFEvqgrqdQGDZuugHrRzw==
"@rspack/cli@^1.1.6":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/cli/-/cli-1.1.6.tgz#74694f3aecbf0607f43aaa5f4e165dc89fb32ebf"
integrity sha512-404JTAadncCp81sDa7nGZdsT7r1Ry8fALR8Wkp9VMTUhWEFlbDGQvOTyali24pfyJxJTdsarSabmNhbDO5okJw==
dependencies:
"@discoveryjs/json-ext" "^0.5.7"
"@rspack/dev-server" "1.0.9"
Expand All @@ -5649,7 +5589,7 @@
webpack-bundle-analyzer "4.6.1"
yargs "17.6.2"

"@rspack/core@^1.1.1":
"@rspack/core@^1.1.1", "@rspack/core@^1.1.6":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.1.6.tgz#f4cafa859cb1500238f9dd24cf69d82d15def10d"
integrity sha512-q0VLphOF5VW2FEG7Vbdq3Ke4I74FbELE/8xmKghSalFtULLZ44SoSz8lyotfMim9GXIRFhDokAaH8WICmPxG+g==
Expand All @@ -5659,16 +5599,6 @@
"@rspack/lite-tapable" "1.0.1"
caniuse-lite "^1.0.30001616"

"@rspack/core@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.1.4.tgz#b876a3d9da56cbabe9e77a8ddd9391267c6ec8d8"
integrity sha512-JUU1pS11TY3/MwnezBfLLp3+7zfkd4Adzo8Pv4f4R1KoJyX1FYBFBcKnfZBlaGYi2C2e5ZDrrHxQlrPmygjbuw==
dependencies:
"@module-federation/runtime-tools" "0.5.1"
"@rspack/binding" "1.1.4"
"@rspack/lite-tapable" "1.0.1"
caniuse-lite "^1.0.30001616"

"@rspack/[email protected]":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@rspack/dev-server/-/dev-server-1.0.9.tgz#3061d3bb643ab0c9765fdb5554b31112be7eba96"
Expand Down

0 comments on commit 7579285

Please sign in to comment.