vue-visual-kit 1.0.202507251507 → 1.0.202508011044

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-visual-kit",
3
- "version": "1.0.202507251507",
3
+ "version": "1.0.202508011044",
4
4
  "private": false,
5
5
  "module": "esm/index.js",
6
6
  "exports": {
@@ -1,130 +1,130 @@
1
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
2
- index addc897..9f20b80 100644
3
- --- a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
4
- +++ b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
5
- @@ -178,7 +178,7 @@ class ContextPoolRenderingEngine extends BaseRenderingEngine {
6
- _renderViewportWithContext(viewport, offscreenMultiRenderWindow, offScreenCanvasContainer) {
7
- if (viewport.sWidth < VIEWPORT_MIN_SIZE ||
8
- viewport.sHeight < VIEWPORT_MIN_SIZE) {
9
- - console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
10
- + // console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
11
- return;
12
- }
13
- if (viewportTypeUsesCustomRenderingPipeline(viewport.type)) {
14
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js b/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
15
- index 46aba9e..259a5a1 100644
16
- --- a/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
17
- +++ b/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
18
- @@ -6,6 +6,7 @@ import vtkXMLPolyDataReader from '@kitware/vtk.js/IO/XML/XMLPolyDataReader';
19
- import vtkOBJReader from '@kitware/vtk.js/IO/Misc/OBJReader';
20
- import vtkProperty from '@kitware/vtk.js/Rendering/Core/Property';
21
- import vtkPolyDataNormals from '@kitware/vtk.js/Filters/Core/PolyDataNormals';
22
- +import vtkWindowedSincPolyDataFilter from '@kitware/vtk.js/Filters/General/WindowedSincPolyDataFilter';
23
- import { MeshType } from '../../enums';
24
- export class Mesh {
25
- constructor(props) {
26
- @@ -14,13 +15,23 @@ export class Mesh {
27
- this.id = props.id;
28
- this._color = props.color ?? this._color;
29
- this._format = props.format;
30
- + this._sincOption = props.sincOption;
31
- + this._normalOption = props.normalOption;
32
- + this._smoothFlag = props.smoothFlag;
33
- const textDecoder = new TextDecoder();
34
- - const normals = vtkPolyDataNormals.newInstance();
35
- + // const normals = vtkPolyDataNormals.newInstance();
36
- + let normals = null
37
- + if(this._smoothFlag) {
38
- + normals = vtkPolyDataNormals.newInstance(this._normalOption)
39
- + } else {
40
- + normals = vtkPolyDataNormals.newInstance()
41
- + }
42
- const createActorWithMapper = (mapper) => {
43
- const actor = vtkActor.newInstance();
44
- actor.setMapper(mapper);
45
- const property = vtkProperty.newInstance();
46
- property.setColor(this._color[0] / 255, this._color[1] / 255, this._color[2] / 255);
47
- + property.setInterpolationToPhong();
48
- actor.setProperty(property);
49
- return actor;
50
- };
51
- @@ -35,8 +46,16 @@ export class Mesh {
52
- const mapper = vtkMapper.newInstance();
53
- const reader = vtkSTLReader.newInstance();
54
- reader.parseAsArrayBuffer(props.arrayBuffer);
55
- - normals.setInputConnection(reader.getOutputPort());
56
- + // normals.setInputConnection(reader.getOutputPort());
57
- + if(this._smoothFlag) {
58
- + const smoothFilter = vtkWindowedSincPolyDataFilter.newInstance(this._sincOption)
59
- + smoothFilter.setInputConnection(reader.getOutputPort());
60
- + normals.setInputConnection(smoothFilter.getOutputPort());
61
- + } else {
62
- + normals.setInputConnection(reader.getOutputPort());
63
- + }
64
- mapper.setInputConnection(normals.getOutputPort());
65
- + mapper.setScalarVisibility(false);
66
- this._actors.push(createActorWithMapper(mapper));
67
- }
68
- else if (this._format === MeshType.OBJ) {
69
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
70
- index f866524..ad370a4 100644
71
- --- a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
72
- +++ b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
73
- @@ -23,6 +23,18 @@ const presets = [
74
- diffuse: '0.9',
75
- interpolation: '1',
76
- },
77
- + {
78
- + name: 'CT-NONE',
79
- + gradientOpacity: '4 0 1 0 1',
80
- + specularPower: '10',
81
- + scalarOpacity: '16 0 0 0 0 0 0 0 0',
82
- + specular: '0.2',
83
- + shade: '1',
84
- + ambient: '0.1',
85
- + colorTransfer: '16 -3024 0 0 0 -16.4458 0.729412 0.254902 0.301961 641.385 0.905882 0.815686 0.552941 3071 1 1 1',
86
- + diffuse: '0.9',
87
- + interpolation: '1',
88
- + },
89
- {
90
- name: 'CT-Bone',
91
- gradientOpacity: '4 0 1 255 1',
92
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js b/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
93
- index fb16294..aef45b1 100644
94
- --- a/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
95
- +++ b/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
96
- @@ -24,7 +24,7 @@ function cornerstoneStreamingImageVolumeLoader(volumeId, options) {
97
- imageLoadPoolManager.addRequest(async () => {
98
- loadImage(imageId)
99
- .then(() => {
100
- - console.log(`Prefetched imageId: ${imageId}`);
101
- + // console.log(`Prefetched imageId: ${imageId}`);
102
- resolve(true);
103
- })
104
- .catch((err) => {
105
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js b/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
106
- index 7701b73..4319713 100644
107
- --- a/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
108
- +++ b/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
109
- @@ -413,7 +413,7 @@ export default class VoxelManager {
110
- }
111
- const image = cache.getImage(imageId);
112
- if (!image) {
113
- - console.warn(`Image not found for imageId: ${imageId}`);
114
- + // console.warn(`Image not found for imageId: ${imageId}`);
115
- return { pixelData: null, pixelIndex: null };
116
- }
117
- const voxelManager = image.voxelManager;
118
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js b/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
119
- index 02c8518..b5a9b0e 100644
120
- --- a/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
121
- +++ b/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
122
- @@ -26,7 +26,7 @@ export default function getClosestImageId(imageVolume, worldPos, viewPlaneNormal
123
- const imageId = imageIds[i];
124
- const imagePlaneModule = metaData.get('imagePlaneModule', imageId);
125
- if (!imagePlaneModule?.imagePositionPatient) {
126
- - log.warn(`Missing imagePositionPatient for imageId: ${imageId}`);
127
- + // log.warn(`Missing imagePositionPatient for imageId: ${imageId}`);
128
- continue;
129
- }
130
- const { imagePositionPatient } = imagePlaneModule;
1
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
2
+ index addc897..9f20b80 100644
3
+ --- a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
4
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js
5
+ @@ -178,7 +178,7 @@ class ContextPoolRenderingEngine extends BaseRenderingEngine {
6
+ _renderViewportWithContext(viewport, offscreenMultiRenderWindow, offScreenCanvasContainer) {
7
+ if (viewport.sWidth < VIEWPORT_MIN_SIZE ||
8
+ viewport.sHeight < VIEWPORT_MIN_SIZE) {
9
+ - console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
10
+ + // console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
11
+ return;
12
+ }
13
+ if (viewportTypeUsesCustomRenderingPipeline(viewport.type)) {
14
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js b/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
15
+ index 46aba9e..259a5a1 100644
16
+ --- a/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
17
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
18
+ @@ -6,6 +6,7 @@ import vtkXMLPolyDataReader from '@kitware/vtk.js/IO/XML/XMLPolyDataReader';
19
+ import vtkOBJReader from '@kitware/vtk.js/IO/Misc/OBJReader';
20
+ import vtkProperty from '@kitware/vtk.js/Rendering/Core/Property';
21
+ import vtkPolyDataNormals from '@kitware/vtk.js/Filters/Core/PolyDataNormals';
22
+ +import vtkWindowedSincPolyDataFilter from '@kitware/vtk.js/Filters/General/WindowedSincPolyDataFilter';
23
+ import { MeshType } from '../../enums';
24
+ export class Mesh {
25
+ constructor(props) {
26
+ @@ -14,13 +15,23 @@ export class Mesh {
27
+ this.id = props.id;
28
+ this._color = props.color ?? this._color;
29
+ this._format = props.format;
30
+ + this._sincOption = props.sincOption;
31
+ + this._normalOption = props.normalOption;
32
+ + this._smoothFlag = props.smoothFlag;
33
+ const textDecoder = new TextDecoder();
34
+ - const normals = vtkPolyDataNormals.newInstance();
35
+ + // const normals = vtkPolyDataNormals.newInstance();
36
+ + let normals = null
37
+ + if(this._smoothFlag) {
38
+ + normals = vtkPolyDataNormals.newInstance(this._normalOption)
39
+ + } else {
40
+ + normals = vtkPolyDataNormals.newInstance()
41
+ + }
42
+ const createActorWithMapper = (mapper) => {
43
+ const actor = vtkActor.newInstance();
44
+ actor.setMapper(mapper);
45
+ const property = vtkProperty.newInstance();
46
+ property.setColor(this._color[0] / 255, this._color[1] / 255, this._color[2] / 255);
47
+ + property.setInterpolationToPhong();
48
+ actor.setProperty(property);
49
+ return actor;
50
+ };
51
+ @@ -35,8 +46,16 @@ export class Mesh {
52
+ const mapper = vtkMapper.newInstance();
53
+ const reader = vtkSTLReader.newInstance();
54
+ reader.parseAsArrayBuffer(props.arrayBuffer);
55
+ - normals.setInputConnection(reader.getOutputPort());
56
+ + // normals.setInputConnection(reader.getOutputPort());
57
+ + if(this._smoothFlag) {
58
+ + const smoothFilter = vtkWindowedSincPolyDataFilter.newInstance(this._sincOption)
59
+ + smoothFilter.setInputConnection(reader.getOutputPort());
60
+ + normals.setInputConnection(smoothFilter.getOutputPort());
61
+ + } else {
62
+ + normals.setInputConnection(reader.getOutputPort());
63
+ + }
64
+ mapper.setInputConnection(normals.getOutputPort());
65
+ + mapper.setScalarVisibility(false);
66
+ this._actors.push(createActorWithMapper(mapper));
67
+ }
68
+ else if (this._format === MeshType.OBJ) {
69
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
70
+ index f866524..ad370a4 100644
71
+ --- a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
72
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
73
+ @@ -23,6 +23,18 @@ const presets = [
74
+ diffuse: '0.9',
75
+ interpolation: '1',
76
+ },
77
+ + {
78
+ + name: 'CT-NONE',
79
+ + gradientOpacity: '4 0 1 0 1',
80
+ + specularPower: '10',
81
+ + scalarOpacity: '16 0 0 0 0 0 0 0 0',
82
+ + specular: '0.2',
83
+ + shade: '1',
84
+ + ambient: '0.1',
85
+ + colorTransfer: '16 -3024 0 0 0 -16.4458 0.729412 0.254902 0.301961 641.385 0.905882 0.815686 0.552941 3071 1 1 1',
86
+ + diffuse: '0.9',
87
+ + interpolation: '1',
88
+ + },
89
+ {
90
+ name: 'CT-Bone',
91
+ gradientOpacity: '4 0 1 255 1',
92
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js b/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
93
+ index fb16294..aef45b1 100644
94
+ --- a/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
95
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js
96
+ @@ -24,7 +24,7 @@ function cornerstoneStreamingImageVolumeLoader(volumeId, options) {
97
+ imageLoadPoolManager.addRequest(async () => {
98
+ loadImage(imageId)
99
+ .then(() => {
100
+ - console.log(`Prefetched imageId: ${imageId}`);
101
+ + // console.log(`Prefetched imageId: ${imageId}`);
102
+ resolve(true);
103
+ })
104
+ .catch((err) => {
105
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js b/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
106
+ index 7701b73..4319713 100644
107
+ --- a/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
108
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
109
+ @@ -413,7 +413,7 @@ export default class VoxelManager {
110
+ }
111
+ const image = cache.getImage(imageId);
112
+ if (!image) {
113
+ - console.warn(`Image not found for imageId: ${imageId}`);
114
+ + // console.warn(`Image not found for imageId: ${imageId}`);
115
+ return { pixelData: null, pixelIndex: null };
116
+ }
117
+ const voxelManager = image.voxelManager;
118
+ diff --git a/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js b/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
119
+ index 02c8518..b5a9b0e 100644
120
+ --- a/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
121
+ +++ b/node_modules/@cornerstonejs/core/dist/esm/utilities/getClosestImageId.js
122
+ @@ -26,7 +26,7 @@ export default function getClosestImageId(imageVolume, worldPos, viewPlaneNormal
123
+ const imageId = imageIds[i];
124
+ const imagePlaneModule = metaData.get('imagePlaneModule', imageId);
125
+ if (!imagePlaneModule?.imagePositionPatient) {
126
+ - log.warn(`Missing imagePositionPatient for imageId: ${imageId}`);
127
+ + // log.warn(`Missing imagePositionPatient for imageId: ${imageId}`);
128
+ continue;
129
+ }
130
+ const { imagePositionPatient } = imagePlaneModule;
@@ -1,114 +1,132 @@
1
- diff --git a/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js b/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
2
- index e4bfd9b..46105be 100644
3
- --- a/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
4
- +++ b/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
5
- @@ -2,6 +2,7 @@ import _getHash from './_getHash';
6
- import setNewAttributesIfValid from './setNewAttributesIfValid';
7
- import setAttributesIfNecessary from './setAttributesIfNecessary';
8
- function drawHandle(svgDrawingHelper, annotationUID, handleGroupUID, handle, options = {}, uniqueIndex) {
9
- + if(!handle) return
10
- const { color, handleRadius, width, lineWidth, fill, type, opacity } = Object.assign({
11
- color: 'rgb(0, 255, 0)',
12
- handleRadius: '6',
13
- diff --git a/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js b/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
14
- index e0e5d55..9de6b6c 100644
15
- --- a/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
16
- +++ b/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
17
- @@ -37,6 +37,7 @@ class CrosshairsTool extends AnnotationTool {
18
- constructor(toolProps = {}, defaultToolProps = {
19
- supportedInteractionTypes: ['Mouse'],
20
- configuration: {
21
- + rotatable: false,
22
- shadow: true,
23
- viewportIndicators: false,
24
- viewportIndicatorsConfig: {
25
- @@ -575,6 +576,7 @@ class CrosshairsTool extends AnnotationTool {
26
- viewportDraggableRotatable &&
27
- viewportSlabThicknessControlsOn) {
28
- let handleUID = `${lineIndex}One`;
29
- + opacity = this.configuration.rotatable?opacity:0
30
- drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
31
- color,
32
- handleRadius,
33
- @@ -594,6 +596,7 @@ class CrosshairsTool extends AnnotationTool {
34
- !slabThicknessHandlesActive &&
35
- viewportDraggableRotatable) {
36
- const handleUID = `${lineIndex}`;
37
- + opacity = this.configuration.rotatable?opacity:0
38
- drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
39
- color,
40
- handleRadius,
41
- @@ -619,10 +622,12 @@ class CrosshairsTool extends AnnotationTool {
42
- (this.configuration.enableHDPIHandles
43
- ? window.devicePixelRatio
44
- : 1);
45
- + opacity = this.configuration.rotatable?opacity:0
46
- drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
47
- color,
48
- handleRadius,
49
- fill: color,
50
- + opacity,
51
- type: 'circle',
52
- });
53
- }
54
- @@ -972,7 +977,11 @@ class CrosshairsTool extends AnnotationTool {
55
- if (this._isClockWise(centerCanvas, originalPointCanvas, finalPointCanvas)) {
56
- angle *= -1;
57
- }
58
- - angle = Math.round(angle * 100) / 100;
59
- + if(this.configuration.rotatable) {
60
- + angle = Math.round(angle * 100) / 100;
61
- + } else {
62
- + angle = 0
63
- + }
64
- const rotationAxis = viewport.getCamera().viewPlaneNormal;
65
- const { matrix } = vtkMatrixBuilder
66
- .buildFromRadian()
67
- diff --git a/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js b/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
68
- index 63bdec9..c596c44 100644
69
- --- a/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
70
- +++ b/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
71
- @@ -24,6 +24,7 @@ class RectangleROITool extends AnnotationTool {
72
- constructor(toolProps = {}, defaultToolProps = {
73
- supportedInteractionTypes: ['Mouse', 'Touch'],
74
- configuration: {
75
- + textBoxVisibility: true,
76
- storePointData: false,
77
- shadow: true,
78
- preventHandleOutsideImage: false,
79
- @@ -394,18 +395,24 @@ class RectangleROITool extends AnnotationTool {
80
- }, dataId);
81
- renderStatus = true;
82
- const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
83
- - if (!options.visibility) {
84
- - data.handles.textBox = {
85
- - hasMoved: false,
86
- - worldPosition: [0, 0, 0],
87
- - worldBoundingBox: {
88
- - topLeft: [0, 0, 0],
89
- - topRight: [0, 0, 0],
90
- - bottomLeft: [0, 0, 0],
91
- - bottomRight: [0, 0, 0],
92
- - },
93
- - };
94
- + const textBoxGoneTmp = {
95
- + hasMoved: false,
96
- + worldPosition: [0, 0, 0],
97
- + worldBoundingBox: {
98
- + topLeft: [0, 0, 0],
99
- + topRight: [0, 0, 0],
100
- + bottomLeft: [0, 0, 0],
101
- + bottomRight: [0, 0, 0],
102
- + }
103
- + };
104
- + if(!this.configuration.textBoxVisibility) {
105
- + data.handles.textBox = textBoxGoneTmp;
106
- continue;
107
- + } else {
108
- + if (!options.visibility) {
109
- + data.handles.textBox = textBoxGoneTmp;
110
- + continue;
111
- + }
112
- }
113
- const textLines = this.configuration.getTextLines(data, targetId);
114
- if (!textLines || textLines.length === 0) {
1
+ diff --git a/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js b/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
2
+ index e4bfd9b..46105be 100644
3
+ --- a/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
4
+ +++ b/node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHandle.js
5
+ @@ -2,6 +2,7 @@ import _getHash from './_getHash';
6
+ import setNewAttributesIfValid from './setNewAttributesIfValid';
7
+ import setAttributesIfNecessary from './setAttributesIfNecessary';
8
+ function drawHandle(svgDrawingHelper, annotationUID, handleGroupUID, handle, options = {}, uniqueIndex) {
9
+ + if(!handle) return
10
+ const { color, handleRadius, width, lineWidth, fill, type, opacity } = Object.assign({
11
+ color: 'rgb(0, 255, 0)',
12
+ handleRadius: '6',
13
+ diff --git a/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js b/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
14
+ index 7c783cb..f23183b 100644
15
+ --- a/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
16
+ +++ b/node_modules/@cornerstonejs/tools/dist/esm/tools/CrosshairsTool.js
17
+ @@ -36,6 +36,7 @@ class CrosshairsTool extends AnnotationTool {
18
+ constructor(toolProps = {}, defaultToolProps = {
19
+ supportedInteractionTypes: ['Mouse'],
20
+ configuration: {
21
+ + rotatable: false,
22
+ shadow: true,
23
+ viewportIndicators: false,
24
+ viewportIndicatorsConfig: {
25
+ @@ -582,17 +583,18 @@ class CrosshairsTool extends AnnotationTool {
26
+ viewportDraggableRotatable &&
27
+ viewportSlabThicknessControlsOn) {
28
+ let handleUID = `${lineIndex}One`;
29
+ + let opacity1 = this.configuration.rotatable?opacity:0
30
+ drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
31
+ color,
32
+ handleRadius,
33
+ - opacity,
34
+ + opacity: opacity1,
35
+ type: 'circle',
36
+ });
37
+ handleUID = `${lineIndex}Two`;
38
+ drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, slabThicknessHandles, {
39
+ color,
40
+ handleRadius,
41
+ - opacity,
42
+ + opacity: opacity1,
43
+ type: 'rect',
44
+ });
45
+ }
46
+ @@ -601,10 +603,11 @@ class CrosshairsTool extends AnnotationTool {
47
+ !slabThicknessHandlesActive &&
48
+ viewportDraggableRotatable) {
49
+ const handleUID = `${lineIndex}`;
50
+ + let opacity1 = this.configuration.rotatable?opacity:0
51
+ drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
52
+ color,
53
+ handleRadius,
54
+ - opacity,
55
+ + opacity: opacity1,
56
+ type: 'circle',
57
+ });
58
+ }
59
+ @@ -626,10 +629,12 @@ class CrosshairsTool extends AnnotationTool {
60
+ (this.configuration.enableHDPIHandles
61
+ ? window.devicePixelRatio
62
+ : 1);
63
+ + let opacity1 = this.configuration.rotatable?opacity:0
64
+ drawHandlesSvg(svgDrawingHelper, annotationUID, handleUID, rotationHandles, {
65
+ color,
66
+ handleRadius,
67
+ fill: color,
68
+ + opacity: opacity1,
69
+ type: 'circle',
70
+ });
71
+ }
72
+ @@ -979,7 +984,11 @@ class CrosshairsTool extends AnnotationTool {
73
+ if (this._isClockWise(centerCanvas, originalPointCanvas, finalPointCanvas)) {
74
+ angle *= -1;
75
+ }
76
+ - angle = Math.round(angle * 100) / 100;
77
+ + if(this.configuration.rotatable) {
78
+ + angle = Math.round(angle * 100) / 100;
79
+ + } else {
80
+ + angle = 0
81
+ + }
82
+ const rotationAxis = viewport.getCamera().viewPlaneNormal;
83
+ const { matrix } = vtkMatrixBuilder
84
+ .buildFromRadian()
85
+ diff --git a/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js b/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
86
+ index df9ffed..f9848dd 100644
87
+ --- a/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
88
+ +++ b/node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/RectangleROITool.js
89
+ @@ -24,6 +24,7 @@ class RectangleROITool extends AnnotationTool {
90
+ constructor(toolProps = {}, defaultToolProps = {
91
+ supportedInteractionTypes: ['Mouse', 'Touch'],
92
+ configuration: {
93
+ + textBoxVisibility: true,
94
+ storePointData: false,
95
+ shadow: true,
96
+ preventHandleOutsideImage: false,
97
+ @@ -395,18 +396,24 @@ class RectangleROITool extends AnnotationTool {
98
+ }, dataId);
99
+ renderStatus = true;
100
+ const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
101
+ - if (!options.visibility) {
102
+ - data.handles.textBox = {
103
+ - hasMoved: false,
104
+ - worldPosition: [0, 0, 0],
105
+ - worldBoundingBox: {
106
+ - topLeft: [0, 0, 0],
107
+ - topRight: [0, 0, 0],
108
+ - bottomLeft: [0, 0, 0],
109
+ - bottomRight: [0, 0, 0],
110
+ - },
111
+ - };
112
+ + const textBoxGoneTmp = {
113
+ + hasMoved: false,
114
+ + worldPosition: [0, 0, 0],
115
+ + worldBoundingBox: {
116
+ + topLeft: [0, 0, 0],
117
+ + topRight: [0, 0, 0],
118
+ + bottomLeft: [0, 0, 0],
119
+ + bottomRight: [0, 0, 0],
120
+ + }
121
+ + };
122
+ + if(!this.configuration.textBoxVisibility) {
123
+ + data.handles.textBox = textBoxGoneTmp;
124
+ continue;
125
+ + } else {
126
+ + if (!options.visibility) {
127
+ + data.handles.textBox = textBoxGoneTmp;
128
+ + continue;
129
+ + }
130
+ }
131
+ const textLines = this.configuration.getTextLines(data, targetId);
132
+ if (!textLines || textLines.length === 0) {