Skip to content

Commit fb5538e

Browse files
committed
Merge branch 'v0.36'
2 parents 4d7d068 + c747d29 commit fb5538e

File tree

9 files changed

+59
-7
lines changed

9 files changed

+59
-7
lines changed

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [v0.36.1](https://github.com/ivmartel/dwv/releases/tag/v0.36.1) - 20/02/2026
4+
5+
### Fixed
6+
7+
- Close annotation on mouse out [#2088](https://github.com/ivmartel/dwv/issues/2088)
8+
- Bound annotation drawing to view [#2083](https://github.com/ivmartel/dwv/issues/2083)
9+
- Missing quantification in annotation SR [#2090](https://github.com/ivmartel/dwv/issues/2090)
10+
11+
---
12+
313
## [v0.36.0](https://github.com/ivmartel/dwv/releases/tag/v0.36.0) - 05/02/2026
414

515
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dwv",
3-
"version": "0.36.0",
3+
"version": "0.36.1",
44
"description": "DICOM Web Viewer.",
55
"keywords": [
66
"DICOM",

resources/api/dwv.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,7 @@ export class ViewController {
14121412
stop(): void;
14131413
unbindImageAndLayer(viewLayer: ViewLayer): void;
14141414
updatePlaneHelper(): void;
1415+
validatePlanePoint(point2D: Point2D): boolean;
14151416
}
14161417

14171418
// @public

resources/doc/jsdoc.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"package": "package.json",
2626
"theme_opts": {
2727
"title": "DWV",
28-
"footer": "<i>Documentation generated for dwv v0.36.0.</i>",
28+
"footer": "<i>Documentation generated for dwv v0.36.1.</i>",
2929
"sections": [
3030
"Tutorials",
3131
"Namespaces",

resources/doc/tutorials/test-results.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Context
44

5-
Commit: [15e8722](https://github.com/ivmartel/dwv/commit/15e87229f378e26dc70b4b5bc1b8425baa732130)
5+
Commit: [df7a7bf](https://github.com/ivmartel/dwv/commit/df7a7bf25ea43603954fc01ad306f336dd9f450e)
66

7-
Date: Thu Feb 05 2026 17:32:08 GMT+0100 (Central European Standard Time)
7+
Date: Fri Feb 20 2026 12:50:29 GMT+0100 (Central European Standard Time)
88

99
Environement: jsdom ^28.0.0
1010

@@ -13,7 +13,7 @@ Success: 379 ✅
1313

1414
Failed: 0 ❌
1515

16-
(total: 379, skipped: 0, total time: 11234ms)
16+
(total: 379, skipped: 0, total time: 12286ms)
1717

1818
## Tests details
1919

@@ -1343,3 +1343,4 @@ URS [#DWV-REQ-UI-09-001 (Livewire)](tutorial-user-stories.html#dwv-req-ui-09-001
13431343

13441344
URS [#DWV-REQ-UI-09-002 (Floodfill)](tutorial-user-stories.html#dwv-req-ui-09-002-floodfill):
13451345
⚠️ No tests
1346+

src/app/viewController.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,18 @@ export class ViewController {
666666
return this.getCurrentPosition().mergeWith3D(point3D);
667667
}
668668

669+
/**
670+
* Check if an input plane point is in the geometrys' bounds.
671+
*
672+
* @param {Point2D} point2D The point to check.
673+
* @returns {boolean} True if in bounds.
674+
*/
675+
validatePlanePoint(point2D) {
676+
const pos = this.getPositionFromPlanePoint(point2D);
677+
const geometry = this.#view.getImage().getGeometry();
678+
return geometry.isInBounds(pos);
679+
}
680+
669681
/**
670682
* Get a 2D plane position from a world position.
671683
*

src/dicom/dicomCode.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,14 @@ export function getConceptNameCode(name) {
375375
const item = QuantificationName2DictItem[name];
376376
let code;
377377
if (typeof item !== 'undefined') {
378-
code = getDicomCode(item.key, item.scheme);
378+
if (item.scheme === 'DCM') {
379+
code = getDcmDicomCode({
380+
meaning: name,
381+
value: item.key
382+
});
383+
} else {
384+
code = getDicomCode(item.key, item.scheme);
385+
}
379386
}
380387
return code;
381388
}

src/dicom/dicomParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {logger} from '../utils/logger.js';
3333
* @returns {string} The version of the library.
3434
*/
3535
export function getDwvVersion() {
36-
return '0.36.0';
36+
return '0.36.1';
3737
}
3838

3939
/**

src/tools/draw.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,12 @@ export class Draw {
443443
}
444444
const pos = viewLayer.displayToPlanePos(point);
445445

446+
// validate position
447+
const vc = viewLayer.getViewController();
448+
if (!vc.validatePlanePoint(pos)) {
449+
return;
450+
}
451+
446452
// draw line to current pos
447453
if (Math.abs(pos.getX() - this.#lastPoint.getX()) > 0 ||
448454
Math.abs(pos.getY() - this.#lastPoint.getY()) > 0) {
@@ -549,6 +555,15 @@ export class Draw {
549555
this.#finishShapeGroupCreation(layerDetails.groupDivId);
550556
};
551557

558+
/**
559+
* Handle mouse out event.
560+
*
561+
* @param {object} event The mouse out event.
562+
*/
563+
mouseout = (event) => {
564+
this.mouseup(event);
565+
};
566+
552567
/**
553568
* Handle double click event: some tools use it to finish interaction.
554569
*
@@ -614,6 +629,12 @@ export class Draw {
614629
}
615630
const pos = viewLayer.displayToPlanePos(touchPoints[0]);
616631

632+
// validate position
633+
const vc = viewLayer.getViewController();
634+
if (!vc.validatePlanePoint(pos)) {
635+
return;
636+
}
637+
617638
if (Math.abs(pos.getX() - this.#lastPoint.getX()) > 0 ||
618639
Math.abs(pos.getY() - this.#lastPoint.getY()) > 0) {
619640
// clear last added point from the list (but not the first one)

0 commit comments

Comments
 (0)