Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .eslintrc.strict.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ESLint config that approximates DeepSource + SonarQube rules.
* Run with: bun run lint:strict (or: bunx eslint --config .eslintrc.strict.cjs src/)
* Run with: pnpm run lint:strict (or: pnpm exec eslint --config .eslintrc.strict.cjs src/)
*
* DeepSource's JavaScript analyzer uses ESLint under the hood and supports
* style_guide (e.g. "standard"). SonarQube rules are available via eslint-plugin-sonarjs.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:

- name: Bump version and cut a release
env:
HUSKY: 0
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ vars.RELEASE_GIT_AUTHOR_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.RELEASE_GIT_AUTHOR_EMAIL }}
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh
# Block commit if typecheck or lint fails
bun run typecheck && bun run lint
pnpm run typecheck && pnpm run lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ The configuration can be changed at build-time using the `REACT_APP_CONFIG` envi
When `enableServerSelection` is enabled in config, users can switch the active DICOMweb server at runtime via the header.

- **Full URLs**: Paste the complete server URL (e.g. `https://healthcare.googleapis.com/v1/projects/.../dicomWeb`).
- **Path-only (GCP Healthcare)**: Paste a GCP DICOM store path without the domain (e.g. `/projects/my-project/locations/us-central1/datasets/my-dataset/dicomStores/my-store/dicomWeb`). The app prepends `https://healthcare.googleapis.com/v1` automatically.
- **Path-only (GCP Healthcare)**: Paste a GCP DICOM store path without the domain (e.g. `/projects/my-project/locations/us-central1/datasets/my-dataset/dicomStores/my-store`). The app prepends `https://healthcare.googleapis.com/v1` and appends `/dicomWeb` automatically.

Authorization is re-applied when switching servers, so a page reload is not needed after changing the active server.

Expand Down
2 changes: 0 additions & 2 deletions bunfig.toml

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"classnames": "^2.2.6",
"dcmjs": "^0.35.0",
"detect-browser": "^5.2.1",
"dicom-microscopy-viewer": "^0.48.21",
"dicom-microscopy-viewer": "^0.48.22",
"dicomweb-client": "0.10.3",
"oidc-client": "^1.11.5",
"ol": "^10.7.0",
Expand Down Expand Up @@ -82,7 +82,6 @@
"eslint": "^8.57.0",
"eslint-plugin-sonarjs": "^0.25.0",
"gh-pages": "^5.0.0",
"happy-dom": "^20.8.7",
"husky": "^9.1.7",
"react-scripts": "5.0.0",
"react-test-renderer": "^18.2.0",
Expand Down
67 changes: 5 additions & 62 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `bun run start`.
To create a production bundle, use `npm run build` or `bun run build`.
To begin the development, run `pnpm start`.
To create a production bundle, use `pnpm run build`.
-->
</body>
</html>
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class Header extends React.Component<HeaderProps, HeaderState> {
{this.state.serverSelectionMode === 'custom' && (
<Tooltip title={this.state.selectedServerUrl?.trim()}>
<Input
placeholder="Full URL or GCP path (e.g. /projects/.../dicomStores/.../dicomWeb)"
placeholder="Full URL or GCP path (e.g. /projects/.../dicomStores/my-store)"
value={this.state.selectedServerUrl}
onChange={this.handleServerSelectionInput}
onPressEnter={this.handleServerSelection}
Expand Down
54 changes: 17 additions & 37 deletions src/components/SlideViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -613,48 +613,28 @@ class SlideViewer extends React.Component<SlideViewerProps, SlideViewerState> {
greenDescriptor:
cpLUTItem.GreenPaletteColorLookupTableDescriptor,
blueDescriptor: cpLUTItem.BluePaletteColorLookupTableDescriptor,
redData:
cpLUTItem.RedPaletteColorLookupTableData !== null &&
cpLUTItem.RedPaletteColorLookupTableData !== undefined
? new Uint16Array(cpLUTItem.RedPaletteColorLookupTableData)
: undefined,
// Pass the LUT data through as retrieved. The element size of
// Palette Color Lookup Table Data is governed by the third
// value of the descriptor (bits per entry), not by the VR, so
// dicom-microscopy-viewer reinterprets the bytes accordingly.
// In particular, conformant Presentation States encode 8-bit
// entries (descriptor [n, first, 8]) byte-packed inside the
// OW element; eagerly wrapping in a Uint16Array here would
// halve the entry count and break the LUT.
redData: cpLUTItem.RedPaletteColorLookupTableData ?? undefined,
greenData:
cpLUTItem.GreenPaletteColorLookupTableData !== null &&
cpLUTItem.GreenPaletteColorLookupTableData !== undefined
? new Uint16Array(
cpLUTItem.GreenPaletteColorLookupTableData,
)
: undefined,
cpLUTItem.GreenPaletteColorLookupTableData ?? undefined,
blueData:
cpLUTItem.BluePaletteColorLookupTableData !== null &&
cpLUTItem.BluePaletteColorLookupTableData !== undefined
? new Uint16Array(cpLUTItem.BluePaletteColorLookupTableData)
: undefined,
cpLUTItem.BluePaletteColorLookupTableData ?? undefined,
redSegmentedData:
cpLUTItem.SegmentedRedPaletteColorLookupTableData !== null &&
cpLUTItem.SegmentedRedPaletteColorLookupTableData !==
undefined
? new Uint16Array(
cpLUTItem.SegmentedRedPaletteColorLookupTableData,
)
: undefined,
cpLUTItem.SegmentedRedPaletteColorLookupTableData ??
undefined,
greenSegmentedData:
cpLUTItem.SegmentedGreenPaletteColorLookupTableData !==
null &&
cpLUTItem.SegmentedGreenPaletteColorLookupTableData !==
undefined
? new Uint16Array(
cpLUTItem.SegmentedGreenPaletteColorLookupTableData,
)
: undefined,
cpLUTItem.SegmentedGreenPaletteColorLookupTableData ??
undefined,
blueSegmentedData:
cpLUTItem.SegmentedBluePaletteColorLookupTableData !== null &&
cpLUTItem.SegmentedBluePaletteColorLookupTableData !==
undefined
? new Uint16Array(
cpLUTItem.SegmentedBluePaletteColorLookupTableData,
)
: undefined,
cpLUTItem.SegmentedBluePaletteColorLookupTableData ??
undefined,
})
}

Expand Down
67 changes: 0 additions & 67 deletions src/test/bun-preload.ts

This file was deleted.

Loading
Loading