Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d7f4547
refactor(dicom): unify loading and extract core and vtk modules
PaulHax Nov 13, 2026
3da5bf9
refactor(dicom): simplify the loading module
PaulHax Nov 13, 2026
6efdbc7
fix(dicom): settle the thumbnail of a SEG object that fails to load
PaulHax Nov 14, 2026
0554ade
fix(dicomweb): show a series volume when some of its files fail
PaulHax Nov 14, 2026
18f7a26
refactor(dicom): merge duplicate utils imports in loadVolume
PaulHax Nov 14, 2026
6d94b1b
refactor(dicom): tighten the loading module after review
PaulHax Nov 15, 2026
fadf4a3
chore(checks): hold the DICOM module to the quality limits
PaulHax Nov 15, 2026
68077b1
refactor(dicom): tidy the loading module
PaulHax Nov 15, 2026
3955972
fix(dicom): address the final review findings
PaulHax Nov 15, 2026
0080aaf
refactor(dicom): drop the Image spacing dialog
PaulHax Nov 15, 2026
8c41cb3
refactor(dicom): import the module from its defining files
PaulHax Nov 20, 2026
8f429b6
fix(dicom): skip dissolved volumes when showing imported data
PaulHax Nov 20, 2026
b45f709
refactor(dicom): keep module surfaces and e2e timeout rule as on main
PaulHax Nov 20, 2026
08a12d8
refactor(io): bind saved datasets merged into one volume to it
PaulHax Nov 20, 2026
1bc1ed3
refactor(dicom): simplify collection key encoding and drop the positi…
PaulHax Nov 20, 2026
e3dcab2
refactor(dicom): drop decode time slicing and options without callers
PaulHax Nov 20, 2026
9264883
docs(dicom): trim the module README to layout and invariants
PaulHax Nov 20, 2026
1cf3a1e
chore(dicom): enforce module boundaries in eslint alone
PaulHax Nov 20, 2026
87ff39d
test(dicom): keep only decode worker recovery on the module page
PaulHax Nov 20, 2026
37066f1
refactor(dicom): keep one copy of groupBy, abortError and asCoroutine
PaulHax Nov 20, 2026
5b95dbd
refactor(dicom): drop the registry kind and change fields
PaulHax Nov 20, 2026
8b38c5a
refactor(dicom): read ultrasound regions from the dataset
PaulHax Nov 20, 2026
0eb9bdc
refactor(dicom): write tag constants in their element form
PaulHax Nov 20, 2026
735e33d
refactor(dicom): keep plain spacing values instead of spatial metadata
PaulHax Nov 20, 2026
49b1c17
refactor(dicom): move the module to src/dicom
PaulHax Nov 20, 2026
516b5e9
fix(dicom): space irregular stacks by their mean gap
PaulHax Nov 22, 2026
e70d7ba
fix(dicom): allocate chroma subsampled frames and name HTJ2K as undec…
PaulHax Nov 22, 2026
87b635c
fix(dicom): bound the file meta read and keep empty numbers empty
PaulHax Nov 22, 2026
679a861
fix(import): skip image-less DICOM objects and report failures plainly
PaulHax Nov 22, 2026
3d1b5e5
fix(import): read a saved archive once when restoring its members
PaulHax Nov 22, 2026
577f456
fix(layers): accept NUL padded DICOM window values
PaulHax Nov 22, 2026
49e1b48
fix(camera): hold a restored camera against auto-fit
PaulHax Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v4
with:
path: .tmp/datasets
key: e2e-datasets-${{ hashFiles('tests/datasets.ts') }}
key: e2e-datasets-${{ hashFiles('tests/datasets.ts', 'tests/dicomVolumeCorpus.json', 'tests/dicomCompositionCorpus.json') }}
restore-keys: e2e-datasets-
- name: Download missing datasets
run: node tests/downloadDatasets.ts
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/cache@v4
with:
path: .tmp/datasets
key: e2e-datasets-${{ hashFiles('tests/datasets.ts') }}
key: e2e-datasets-${{ hashFiles('tests/datasets.ts', 'tests/dicomVolumeCorpus.json', 'tests/dicomCompositionCorpus.json') }}
restore-keys: e2e-datasets-
- name: Run E2E on chrome (linux)
if: matrix.os == 'ubuntu-latest'
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dist
node_modules
public
src/io/itk-dicom
src/io/resample
*.json
45 changes: 42 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ const E2E_TIMEOUT_DEBT = [
export default tseslint.config(
{
ignores: [
'src/io/itk-dicom/emscripten-build/**',
'src/io/resample/emscripten-build/**',
'**/*.d.ts',
'dist/**',
Expand Down Expand Up @@ -292,7 +291,7 @@ export default tseslint.config(
},
},
{
files: ['src/vtk/**/*.{js,ts}'],
files: ['src/vtk/**/*.{js,ts}', 'src/dicom/vtk/**/*.{js,ts}'],
rules: {
'no-param-reassign': [
'error',
Expand Down Expand Up @@ -380,7 +379,7 @@ export default tseslint.config(
{
files: ['src/**/*.{js,ts,vue}'],
ignores: [
'src/**/__tests__/**',
'**/__tests__/**',
'src/**/*.{spec,test}.{js,ts}',
'src/**/*.d.ts',
'**/emscripten-build/**',
Expand All @@ -395,5 +394,45 @@ export default tseslint.config(
],
},
},
// ESLint matches specifiers, not resolved paths. Core and vtk files sit at
// most one directory deep, so climbing two levels always leaves them.
{
files: ['src/dicom/core/**/*.{js,ts}'],
ignores: ['**/__tests__/**'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
regex:
'^(@/|@src/|vue(?:/|$)|pinia(?:/|$)|@vueuse/|@kitware/vtk\\.js(?:/|$)|(\\.\\./){2}|\\.\\./vtk(?:/|$))',
message:
'DICOM core cannot depend on application code, UI frameworks, vtk.js or the DICOM vtk directory.',
},
],
},
],
},
},
{
files: ['src/dicom/vtk/**/*.{js,ts}'],
ignores: ['**/__tests__/**'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
regex:
'^(@/|@src/|vue(?:/|$)|pinia(?:/|$)|@vueuse/|(\\.\\./){2})',
message:
'DICOM vtk cannot depend on application code, application state or UI frameworks.',
},
],
},
],
},
},
eslintConfigPrettier
);
106 changes: 97 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
"test:e2e:chrome": "cross-env VITE_SHOW_SAMPLE_DATA=true npm run build && cross-env HEADED=0 wdio run ./wdio.chrome.conf.ts",
"test:e2e:chrome:skip-build": "cross-env HEADED=0 wdio run ./wdio.chrome.conf.ts",
"test:e2e:dev": "cross-env HEADED=0 VITE_SHOW_SAMPLE_DATA=true concurrently -P \"npm run dev\" \"wdio run ./wdio.dev.conf.ts --watch {@}\"",
"lint": "vue-tsc --noEmit && eslint \"src/**/*.{js,ts,vue}\" \"tests/**/*.{js,ts}\" \"scripts/**/*.mjs\"",
"build:all": "npm run build:dicom && npm run build:resample && npm run build",
"build:dicom": "itk-wasm -s src/io/itk-dicom/ build ",
"build:dicom:debug": "itk-wasm -s src/io/itk-dicom/ build -- -DCMAKE_BUILD_TYPE=Debug",
"lint": "vue-tsc --noEmit && eslint \"src/**/*.{js,ts,vue}\" \"tests/**/*.{js,ts,mjs}\" \"scripts/**/*.mjs\"",
"build:all": "npm run build:resample && npm run build",
"build:resample": "itk-wasm -s src/io/resample/ build ",
"build:resample:debug": "itk-wasm -s src/io/resample/ build -- -DCMAKE_BUILD_TYPE=Debug",
"build:watch": "npm run build -- --watch",
Expand Down Expand Up @@ -73,13 +71,12 @@
"core-js": "3.47.0",
"cors": "^2.8.5",
"cross-env": "^10.1.0",
"dicom-parser": "^1.8.21",
"dcmjs": "^0.52.0",
"dicomweb-client-typed": "^0.8.6",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-vue": "^10.6.2",
"fast-deep-equal": "^3.1.3",
"fflate": "0.7.5",
"file-saver": "^2.0.5",
"gl-matrix": "3.4.3",
"globals": "^16.2.0",
Expand Down
1 change: 0 additions & 1 deletion scripts/checks/conventions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const BINARY_DIRS = [
'docs/public/',
'public/',
'src/assets/',
'src/io/itk-dicom/emscripten-build/',
'src/io/resample/emscripten-build/',
];
const { base } = stagedContext();
Expand Down
8 changes: 7 additions & 1 deletion src/actions/loadUserFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '@/src/io/import/dataSource';
import useLoadDataStore from '@/src/store/load-data';
import { useDICOMStore } from '@/src/store/datasets-dicom';
import { useImageCacheStore } from '@/src/store/image-cache';
import { useLayersStore } from '@/src/store/datasets-layers';
import { useSegmentationStore } from '@/src/segmentation/store';
import { wrapInArray, nonNullable, partition } from '@/src/utils';
Expand Down Expand Up @@ -276,8 +277,13 @@ export type DataSourceImporter = (
sources: DataSource[]
) => Promise<ImportDataSourcesResult[]>;

export function showImportedData(results: ImportResult[]) {
export function showImportedData(importResults: ImportResult[]) {
const loadDataStore = useLoadDataStore();
const { imageById } = useImageCacheStore();
// A later import can dissolve a volume before its import shows it.
const results = importResults.filter(
(result) => !isVolumeResult(result) || result.dataID in imageById
);

const primaryDataSource = findBaseDataSource(
results,
Expand Down
Loading
Loading