vue-visual-kit 1.0.202507251046 → 1.0.202507251415

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.202507251046",
3
+ "version": "1.0.202507251415",
4
4
  "private": false,
5
5
  "module": "esm/index.js",
6
6
  "exports": {
@@ -23,16 +23,16 @@
23
23
  "patches"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@cornerstonejs/core": "^3.15.3",
27
- "@cornerstonejs/dicom-image-loader": "^3.15.3",
28
- "@cornerstonejs/polymorphic-segmentation": "^3.15.3",
29
- "@cornerstonejs/tools": "^3.15.3"
26
+ "@cornerstonejs/core": "^3.31.13",
27
+ "@cornerstonejs/dicom-image-loader": "^3.31.13",
28
+ "@cornerstonejs/polymorphic-segmentation": "^3.31.13",
29
+ "@cornerstonejs/tools": "^3.31.13"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^3.15.3",
33
- "@cornerstonejs/dicom-image-loader": "^3.15.3",
34
- "@cornerstonejs/polymorphic-segmentation": "^3.15.3",
35
- "@cornerstonejs/tools": "^3.15.3",
32
+ "@cornerstonejs/core": "^3.31.13",
33
+ "@cornerstonejs/dicom-image-loader": "^3.31.13",
34
+ "@cornerstonejs/polymorphic-segmentation": "^3.31.13",
35
+ "@cornerstonejs/tools": "^3.31.13",
36
36
  "@vant/touch-emulator": "^1.4.0",
37
37
  "amfe-flexible": "^2.2.1",
38
38
  "axios": "^0.27.2",
@@ -1,81 +1,18 @@
1
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/BaseVolumeViewport.js b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/BaseVolumeViewport.js
2
- index 75d8c08..8f58cc2 100644
3
- --- a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/BaseVolumeViewport.js
4
- +++ b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/BaseVolumeViewport.js
5
- @@ -1,6 +1,7 @@
6
- import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction';
7
- import vtkColorMaps from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps';
8
- import vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction';
9
- +import vtkCellPicker from '@kitware/vtk.js/Rendering/Core/CellPicker';
10
- import { vec2, vec3 } from 'gl-matrix';
11
- import cache from '../cache/cache';
12
- import { MPR_CAMERA_VALUES, RENDERING_DEFAULTS, VIEWPORT_PRESETS, } from '../constants';
13
- @@ -163,6 +164,50 @@ class BaseVolumeViewport extends Viewport {
14
- vtkCamera.setIsPerformingCoordinateTransformation?.(false);
15
- return [worldCoord[0], worldCoord[1], worldCoord[2]];
16
- };
17
- + this.canvasToWorldV2 = (canvasPos) => {
18
- + const vtkCamera = this.getVtkActiveCamera();
19
- + vtkCamera.setIsPerformingCoordinateTransformation?.(true);
20
- + const renderer = this.getRenderer();
21
- + const displayCoords = this.getVtkDisplayCoords(canvasPos);
22
- + const picker = vtkCellPicker.newInstance({ opacityThreshold: 0.0001 });
23
- + picker.setTolerance(0);
24
- + picker.pick(displayCoords, renderer);
25
- + if (picker.getActors().length>0) {
26
- + const worldCoord = picker.getPickPosition();
27
- + vtkCamera.setIsPerformingCoordinateTransformation?.(false);
28
- + return worldCoord
29
- + } else {
30
- + const offscreenMultiRenderWindow = this.getRenderingEngine().offscreenMultiRenderWindow;
31
- + const openGLRenderWindow = offscreenMultiRenderWindow.getOpenGLRenderWindow();
32
- + const worldCoord = openGLRenderWindow.displayToWorld(displayCoords[0], displayCoords[1], displayCoords[2], renderer);
33
- + vtkCamera.setIsPerformingCoordinateTransformation?.(false);
34
- + return [worldCoord[0], worldCoord[1], worldCoord[2]];
35
- + }
36
- + };
37
- + this.canvasToPickerActors = (canvasPos) => {
38
- + const vtkCamera = this.getVtkActiveCamera();
39
- + vtkCamera.setIsPerformingCoordinateTransformation?.(true);
40
- + const renderer = this.getRenderer();
41
- + const displayCoords = this.getVtkDisplayCoords(canvasPos);
42
- + const picker = vtkCellPicker.newInstance({ opacityThreshold: 0.0001 });
43
- + picker.setTolerance(0);
44
- + picker.pick(displayCoords, renderer);
45
- + const pickedActors = picker.getActors();
46
- + const result = [];
47
- + if (pickedActors.length>0) {
48
- + pickedActors.forEach(it => {
49
- + const tmp = it.get('custome');
50
- + if(tmp.custome && tmp.custome.id) {
51
- + result.push({
52
- + id: tmp.custome.id,
53
- + name: tmp.custome.name
54
- + })
55
- + }
56
- + })
57
- + }
58
- + vtkCamera.setIsPerformingCoordinateTransformation?.(false);
59
- + return result;
60
- + };
61
- this.getVtkDisplayCoords = (canvasPos) => {
62
- const devicePixelRatio = window.devicePixelRatio || 1;
63
- const canvasPosWithDPR = [
64
- diff --git a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/RenderingEngine.js b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/RenderingEngine.js
65
- index 130df4a..b8f9ddd 100644
66
- --- a/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/RenderingEngine.js
67
- +++ b/node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/RenderingEngine.js
68
- @@ -542,7 +542,7 @@ class RenderingEngine {
69
- let eventDetail;
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) {
70
7
  if (viewport.sWidth < VIEWPORT_MIN_SIZE ||
71
8
  viewport.sHeight < VIEWPORT_MIN_SIZE) {
72
9
  - console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
73
10
  + // console.warn('Viewport is too small', viewport.sWidth, viewport.sHeight);
74
11
  return;
75
12
  }
76
- if (viewportTypeUsesCustomRenderingPipeline(viewport.type) === true) {
13
+ if (viewportTypeUsesCustomRenderingPipeline(viewport.type)) {
77
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
78
- index 46aba9e..c3c6e52 100644
15
+ index 46aba9e..259a5a1 100644
79
16
  --- a/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
80
17
  +++ b/node_modules/@cornerstonejs/core/dist/esm/cache/classes/Mesh.js
81
18
  @@ -6,6 +6,7 @@ import vtkXMLPolyDataReader from '@kitware/vtk.js/IO/XML/XMLPolyDataReader';
@@ -86,7 +23,7 @@ index 46aba9e..c3c6e52 100644
86
23
  import { MeshType } from '../../enums';
87
24
  export class Mesh {
88
25
  constructor(props) {
89
- @@ -14,13 +15,22 @@ export class Mesh {
26
+ @@ -14,13 +15,23 @@ export class Mesh {
90
27
  this.id = props.id;
91
28
  this._color = props.color ?? this._color;
92
29
  this._format = props.format;
@@ -95,6 +32,7 @@ index 46aba9e..c3c6e52 100644
95
32
  + this._smoothFlag = props.smoothFlag;
96
33
  const textDecoder = new TextDecoder();
97
34
  - const normals = vtkPolyDataNormals.newInstance();
35
+ + // const normals = vtkPolyDataNormals.newInstance();
98
36
  + let normals = null
99
37
  + if(this._smoothFlag) {
100
38
  + normals = vtkPolyDataNormals.newInstance(this._normalOption)
@@ -110,11 +48,12 @@ index 46aba9e..c3c6e52 100644
110
48
  actor.setProperty(property);
111
49
  return actor;
112
50
  };
113
- @@ -35,8 +45,15 @@ export class Mesh {
51
+ @@ -35,8 +46,16 @@ export class Mesh {
114
52
  const mapper = vtkMapper.newInstance();
115
53
  const reader = vtkSTLReader.newInstance();
116
54
  reader.parseAsArrayBuffer(props.arrayBuffer);
117
55
  - normals.setInputConnection(reader.getOutputPort());
56
+ + // normals.setInputConnection(reader.getOutputPort());
118
57
  + if(this._smoothFlag) {
119
58
  + const smoothFilter = vtkWindowedSincPolyDataFilter.newInstance(this._sincOption)
120
59
  + smoothFilter.setInputConnection(reader.getOutputPort());
@@ -128,7 +67,7 @@ index 46aba9e..c3c6e52 100644
128
67
  }
129
68
  else if (this._format === MeshType.OBJ) {
130
69
  diff --git a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
131
- index f866524..2935ac9 100644
70
+ index f866524..ad370a4 100644
132
71
  --- a/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
133
72
  +++ b/node_modules/@cornerstonejs/core/dist/esm/constants/viewportPresets.js
134
73
  @@ -23,6 +23,18 @@ const presets = [
@@ -144,8 +83,8 @@ index f866524..2935ac9 100644
144
83
  + shade: '1',
145
84
  + ambient: '0.1',
146
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',
147
- + diffuse: '0.9',
148
- + interpolation: '1',
86
+ + diffuse: '0.9',
87
+ + interpolation: '1',
149
88
  + },
150
89
  {
151
90
  name: 'CT-Bone',
@@ -1,114 +1,114 @@
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 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) {