Skip to content

Commit 149ca5d

Browse files
authored
Merge pull request #1 from dev-threads/length-tool-zoom
Length tool zoom
2 parents a3125cd + 1fa2925 commit 149ca5d

122 files changed

Lines changed: 9410 additions & 281 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,13 @@ defaults: &defaults
1313
commands:
1414
install_bun:
1515
steps:
16-
- restore_cache:
17-
keys:
18-
- bun-cache-v2-{{ arch }}-latest
1916
- run:
2017
name: Install Bun
2118
command: |
22-
if [ ! -d "$HOME/.bun" ]; then
23-
curl -fsSL https://bun.sh/install | bash
24-
fi
19+
curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.23"
2520
echo 'export BUN_INSTALL="$HOME/.bun"' >> $BASH_ENV
2621
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $BASH_ENV
2722
source $BASH_ENV
28-
- save_cache:
29-
key: bun-cache-v2-{{ arch }}-latest
30-
paths:
31-
- ~/.bun
3223
3324
jobs:
3425
CHECKOUT:

.github/workflows/build-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: 1.2.23
2729
- uses: actions/setup-node@v4
2830
with:
2931
node-version: 20 # Or your desired Node version

.github/workflows/docusaurus-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup Bun
3232
uses: oven-sh/setup-bun@v2
3333
with:
34-
bun-version: latest
34+
bun-version: 1.2.23
3535

3636
- name: Install root dependencies
3737
run: bun install --frozen-lockfile

.github/workflows/format-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Bun
2929
uses: oven-sh/setup-bun@v2
3030
with:
31-
bun-version: latest
31+
bun-version: 1.2.23
3232

3333
- name: Install dependencies
3434
run: bun install

.github/workflows/playwright.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: oven-sh/setup-bun@v2
21+
with:
22+
bun-version: 1.2.23
2123
- uses: actions/setup-node@v4
2224
with:
2325
node-version: ${{ matrix.node-version }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Bun
1616
uses: oven-sh/setup-bun@v2
1717
with:
18-
bun-version: latest # Or pin to a specific version like '1.1.18'
18+
bun-version: 1.2.23
1919

2020
- name: Install dependencies
2121
run: bun install --frozen-lockfile

CHANGELOG.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,126 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.5.19](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.18...v4.5.19) (2025-10-18)
7+
8+
### Bug Fixes
9+
10+
- Wrong position on rehydrate annotation ([#2404](https://github.com/cornerstonejs/cornerstone3D/issues/2404)) ([1a84852](https://github.com/cornerstonejs/cornerstone3D/commit/1a84852e1448bed31925a623c2dbd09f0cab23fb))
11+
12+
## [4.5.18](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.17...v4.5.18) (2025-10-18)
13+
14+
**Note:** Version bump only for package root
15+
16+
## [4.5.17](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.16...v4.5.17) (2025-10-18)
17+
18+
### Bug Fixes
19+
20+
- planar freehand roi perimeter calculation ([#2341](https://github.com/cornerstonejs/cornerstone3D/issues/2341)) ([d3b607c](https://github.com/cornerstonejs/cornerstone3D/commit/d3b607c2596aec33d93cb7f2834c01ca2783b412))
21+
22+
## [4.5.16](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.15...v4.5.16) (2025-10-17)
23+
24+
### Bug Fixes
25+
26+
- **CrosshairTool:** Fix "setToolCenter" to apply the modification to the viewports camera ([#2402](https://github.com/cornerstonejs/cornerstone3D/issues/2402)) ([4028207](https://github.com/cornerstonejs/cornerstone3D/commit/402820739678f8b9db0b2bddd8c03dc447fabc85))
27+
28+
## [4.5.15](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.14...v4.5.15) (2025-10-16)
29+
30+
### Bug Fixes
31+
32+
- set volume id on creation ([#2345](https://github.com/cornerstonejs/cornerstone3D/issues/2345)) ([#2396](https://github.com/cornerstonejs/cornerstone3D/issues/2396)) ([a47b125](https://github.com/cornerstonejs/cornerstone3D/commit/a47b125193743290c8c412cea85c990738c339ab))
33+
34+
## [4.5.14](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.13...v4.5.14) (2025-10-16)
35+
36+
### Bug Fixes
37+
38+
- **dicomImageLoader:** :bug: set usingDefaultValues in ImagePlane metadata module in the WadoUri loader ([#2391](https://github.com/cornerstonejs/cornerstone3D/issues/2391)) ([d0ea9fd](https://github.com/cornerstonejs/cornerstone3D/commit/d0ea9fdbd3af2df8dc538a5bba15ea8a241dfb0e))
39+
40+
## [4.5.13](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.12...v4.5.13) (2025-10-16)
41+
42+
### Bug Fixes
43+
44+
- **segmentation:** Lock added contour annotations when segment is locked ([#2399](https://github.com/cornerstonejs/cornerstone3D/issues/2399)) ([15cfdd9](https://github.com/cornerstonejs/cornerstone3D/commit/15cfdd93ffdc55dfa70f15bec8cb1be15d1290df))
45+
46+
## [4.5.12](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.11...v4.5.12) (2025-10-16)
47+
48+
**Note:** Version bump only for package root
49+
50+
## [4.5.11](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.10...v4.5.11) (2025-10-16)
51+
52+
### Bug Fixes
53+
54+
- **segmentation:** Lock contour annotations when segment is locked. ([#2395](https://github.com/cornerstonejs/cornerstone3D/issues/2395)) ([83b4092](https://github.com/cornerstonejs/cornerstone3D/commit/83b4092d76c6e115adfd12a50d399e96483622a4))
55+
56+
## [4.5.10](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.9...v4.5.10) (2025-10-16)
57+
58+
### Bug Fixes
59+
60+
- **MagnifyTool:** Fix MagnifyTool freeze when pressing right click ([#2388](https://github.com/cornerstonejs/cornerstone3D/issues/2388)) ([a13fce2](https://github.com/cornerstonejs/cornerstone3D/commit/a13fce2d65aa1d5b8de849ddf6255e3d42dc841a))
61+
62+
## [4.5.9](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.8...v4.5.9) (2025-10-15)
63+
64+
### Bug Fixes
65+
66+
- update toLowHighRange function to handle SIGMOID function bounds as a temporary fix ([#2394](https://github.com/cornerstonejs/cornerstone3D/issues/2394)) ([662a8b3](https://github.com/cornerstonejs/cornerstone3D/commit/662a8b3c7b3268557e9787fd6abc67e923ab731b))
67+
68+
## [4.5.8](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.7...v4.5.8) (2025-10-15)
69+
70+
**Note:** Version bump only for package root
71+
72+
## [4.5.7](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.6...v4.5.7) (2025-10-14)
73+
74+
### Bug Fixes
75+
76+
- **bun:** Use bun version 1.2.23. ([#2390](https://github.com/cornerstonejs/cornerstone3D/issues/2390)) ([222e3a8](https://github.com/cornerstonejs/cornerstone3D/commit/222e3a8d7ea0297a4be327df03510d0ab77d938f))
77+
78+
## [4.5.6](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.5...v4.5.6) (2025-10-10)
79+
80+
### Bug Fixes
81+
82+
- Updated BasicStatsCalculator to change from private to protected ([#2382](https://github.com/cornerstonejs/cornerstone3D/issues/2382)) ([89a8db5](https://github.com/cornerstonejs/cornerstone3D/commit/89a8db54bec5b96a61624dcca65464982d5e40b3))
83+
84+
## [4.5.5](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.4...v4.5.5) (2025-10-09)
85+
86+
### Bug Fixes
87+
88+
- **interpolation:** Fixed contour segmentation interpolation for spline contours. ([#2381](https://github.com/cornerstonejs/cornerstone3D/issues/2381)) ([7d61b2c](https://github.com/cornerstonejs/cornerstone3D/commit/7d61b2c7cd1627c34b0547967c5616d01fc29f96))
89+
90+
## [4.5.4](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.3...v4.5.4) (2025-10-08)
91+
92+
### Bug Fixes
93+
94+
- clear preview segmentation when AI tools are disabled ([#2373](https://github.com/cornerstonejs/cornerstone3D/issues/2373)) ([cfc232c](https://github.com/cornerstonejs/cornerstone3D/commit/cfc232c0472aa89eba859d2e2da97af58ca50bfc))
95+
96+
## [4.5.3](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.2...v4.5.3) (2025-10-08)
97+
98+
### Bug Fixes
99+
100+
- **segmentation:** Added SEGMENTATION_REPRESENTATION_MODIFIED event listener to LabelmapEditWithContour tool to ensure a contour representation is added for the tool. ([#2377](https://github.com/cornerstonejs/cornerstone3D/issues/2377)) ([563fc6c](https://github.com/cornerstonejs/cornerstone3D/commit/563fc6c6b8edf987b115b540d4069a2238b88fee))
101+
102+
## [4.5.2](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.1...v4.5.2) (2025-10-07)
103+
104+
### Bug Fixes
105+
106+
- limit pan off viewport ([#2375](https://github.com/cornerstonejs/cornerstone3D/issues/2375)) ([1850916](https://github.com/cornerstonejs/cornerstone3D/commit/18509162c91b4c2be08c61d95ce75dbeeb4329f2))
107+
108+
## [4.5.1](https://github.com/cornerstonejs/cornerstone3D/compare/v4.5.0...v4.5.1) (2025-10-07)
109+
110+
### Bug Fixes
111+
112+
- **segmentation:** For contour segmentation logical operators, avoid updating segment color and label when they are not defined/specified. ([#2376](https://github.com/cornerstonejs/cornerstone3D/issues/2376)) ([969369a](https://github.com/cornerstonejs/cornerstone3D/commit/969369a623ea39ba9740e547fb94867183ec396b))
113+
114+
# [4.5.0](https://github.com/cornerstonejs/cornerstone3D/compare/v4.4.2...v4.5.0) (2025-10-07)
115+
116+
### Features
117+
118+
- **BrushTool:** segmentation brush interpolation ([#2374](https://github.com/cornerstonejs/cornerstone3D/issues/2374)) ([690ec6e](https://github.com/cornerstonejs/cornerstone3D/commit/690ec6e90499b24364c06ad404fd0d2b0c521134))
119+
120+
## [4.4.2](https://github.com/cornerstonejs/cornerstone3D/compare/v4.4.1...v4.4.2) (2025-10-06)
121+
122+
### Bug Fixes
123+
124+
- ellipse ROI stats ([#2368](https://github.com/cornerstonejs/cornerstone3D/issues/2368)) ([c2c6c99](https://github.com/cornerstonejs/cornerstone3D/commit/c2c6c99fc7846677ad28a36f7697fce7744080e8))
125+
6126
## [4.4.1](https://github.com/cornerstonejs/cornerstone3D/compare/v4.4.0...v4.4.1) (2025-10-03)
7127

8128
### Bug Fixes

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,28 @@ Read our guide on [How-to Contribute](https://cornerstonejs.org/docs/category/co
4242
### License
4343

4444
Cornerstone is [MIT licensed](./LICENSE).
45+
46+
47+
## Development notes
48+
49+
For developing locally and instantly testing with another test project, we need
50+
to link this repository to the other project. This can be done as follows:
51+
52+
- In this project:
53+
54+
```
55+
yarn install
56+
yarn build
57+
```
58+
59+
- In the test project: `npm install /path/to/this/repository`
60+
- In this project: `npm link`
61+
- In the test project: `npm link cornerstone-core`
62+
63+
64+
To immediately reload the test project when something changes here (e.g. in the
65+
tools package), run the build server as follow:
66+
67+
```
68+
yarn workspace @cornerstonejs/tools build:esm:watch
69+
```

commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d859a20051ed92b625d6e71b92d44c2ef9ced79e
1+
1a84852e1448bed31925a623c2dbd09f0cab23fb

karma.conf.js

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
// @ts-check
12
const path = require('path');
3+
const os = require('os');
24

35
process.env.CHROME_BIN = require('puppeteer').executablePath();
46

7+
/**
8+
*
9+
* Tests for the dicomImageLoaders require support for Web Workers and loading
10+
* wasm files required for image decoding.
11+
*
12+
* In order to support this, the karma config requires some customisation. This
13+
* is based on
14+
* https://github.com/codymikol/karma-webpack/issues/498#issuecomment-790040818
15+
*
16+
* The changes are:
17+
* - Define a custom output path for webpack to emit files to
18+
* - Serve the output path via a `files` entry in the karma config
19+
*
20+
* Without this, webpack correctly bundles and outputs the worker and wasm
21+
* files, but they can't be loaded by the tests. Trying to load the worker or
22+
* wasm files returns a 404.
23+
*
24+
* Manually create an output path. This is the same as the default
25+
* karma-webpack config
26+
* https://github.com/codymikol/karma-webpack?tab=readme-ov-file#default-webpack-configuration
27+
*/
28+
const outputPath = path.join(os.tmpdir(), '_karma_webpack_') + Math.floor(Math.random() * 1000000)
29+
30+
/** @param {import('karma').Config} config */
531
module.exports = function (config) {
632
config.set({
733
reporters: ['junit', 'coverage', 'spec'],
@@ -54,7 +80,28 @@ module.exports = function (config) {
5480
files: [
5581
'packages/core/test/**/*_test.js',
5682
'packages/tools/test/**/*_test.js',
83+
// Serve dicomImageLoad test images
84+
{
85+
pattern: 'packages/dicomImageLoader/testImages/**/*',
86+
watched: false,
87+
included: false,
88+
served: true
89+
},
90+
/**
91+
* Required to allow karma to load wasm and worker files built via webpack.
92+
* See the comment at the top of this file for more details.
93+
*/
94+
{
95+
pattern: `${outputPath}/**/*`,
96+
included: false,
97+
served: true,
98+
watched: false
99+
}
57100
],
101+
proxies: {
102+
// Simplified path to access test images in tests
103+
'/testImages/': '/base/packages/dicomImageLoader/testImages/',
104+
},
58105
preprocessors: {
59106
'packages/core/test/**/*_test.js': ['webpack'],
60107
'packages/tools/test/**/*_test.js': ['webpack'],
@@ -73,6 +120,15 @@ module.exports = function (config) {
73120
webpack: {
74121
devtool: 'eval-source-map',
75122
mode: 'development',
123+
output: {
124+
/**
125+
* Override default karma-webpack output path with the one we defined
126+
* above this allows webpack generated files including wasm and workers
127+
* to be served by karma without this, the default config won't allow
128+
* tests to load web workers or wasm files.
129+
*/
130+
path: outputPath,
131+
},
76132
module: {
77133
rules: [
78134
{
@@ -115,7 +171,7 @@ module.exports = function (config) {
115171
],
116172
},
117173
experiments: {
118-
asyncWebAssembly: true,
174+
asyncWebAssembly: true
119175
},
120176
resolve: {
121177
extensions: ['.ts', '.tsx', '.js', '.jsx'],
@@ -126,6 +182,7 @@ module.exports = function (config) {
126182
alias: {
127183
'@cornerstonejs/core': path.resolve('packages/core/src/index'),
128184
'@cornerstonejs/tools': path.resolve('packages/tools/src/index'),
185+
'@cornerstonejs/dicom-image-loader': path.resolve('packages/dicomImageLoader/src/index'),
129186
},
130187
},
131188
},

0 commit comments

Comments
 (0)