File tree Expand file tree Collapse file tree 9 files changed +59
-7
lines changed
Expand file tree Collapse file tree 9 files changed +59
-7
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11{
22 "name" : " dwv" ,
3- "version" : " 0.36.0 " ,
3+ "version" : " 0.36.1 " ,
44 "description" : " DICOM Web Viewer." ,
55 "keywords" : [
66 " DICOM" ,
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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
99Environement: jsdom ^28.0.0
1010
@@ -13,7 +13,7 @@ Success: 379 ✅
1313
1414Failed: 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
13441344URS [ #DWV-REQ-UI-09-002 (Floodfill)] ( tutorial-user-stories.html#dwv-req-ui-09-002-floodfill ) :
13451345 ⚠️ No tests
1346+
Original file line number Diff line number Diff 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 *
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import {logger} from '../utils/logger.js';
3333 * @returns {string } The version of the library.
3434 */
3535export function getDwvVersion ( ) {
36- return '0.36.0 ' ;
36+ return '0.36.1 ' ;
3737}
3838
3939/**
Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments