@kitware/vtk.js 34.17.0 → 35.0.0
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/BREAKING_CHANGES.md +5 -0
- package/CONTRIBUTING.md +1 -1
- package/Common/Core/Math/index.js +15 -1
- package/Common/Core/Math.d.ts +8 -0
- package/Common/Core/Math.js +1 -1
- package/Common/DataModel/BoundingBox.d.ts +8 -3
- package/Common/DataModel/BoundingBox.js +16 -7
- package/Common/DataModel/Box.js +1 -1
- package/Common/DataModel/PointSet.js +2 -2
- package/Filters/General/WindowedSincPolyDataFilter.js +2 -4
- package/Proxy/Core/ViewProxy.js +5 -1
- package/Rendering/Core/AbstractImageMapper.d.ts +4 -0
- package/Rendering/Core/AbstractMapper3D.d.ts +21 -2
- package/Rendering/Core/AbstractMapper3D.js +14 -5
- package/Rendering/Core/CubeAxesActor.js +7 -4
- package/Rendering/Core/Glyph3DMapper.js +8 -40
- package/Rendering/Core/ImageArrayMapper.js +9 -4
- package/Rendering/Core/ImageCPRMapper.js +4 -3
- package/Rendering/Core/ImageMapper.js +7 -4
- package/Rendering/Core/ImageProperty.d.ts +7 -0
- package/Rendering/Core/ImageResliceMapper.js +6 -6
- package/Rendering/Core/ImageSlice.js +6 -6
- package/Rendering/Core/Mapper.js +5 -5
- package/Rendering/Core/Prop3D.js +22 -25
- package/Rendering/Core/VolumeMapper.js +7 -3
- package/Rendering/OpenGL/ImageResliceMapper.js +477 -81
- package/Widgets/Representations/ArrowHandleRepresentation.js +7 -1
- package/Widgets/Representations/CircleContextRepresentation.js +18 -3
- package/Widgets/Representations/SplineContextRepresentation.js +12 -5
- package/Widgets/Widgets3D/ResliceCursorWidget.js +5 -2
- package/package.json +1 -1
|
@@ -137,7 +137,13 @@ function vtkArrowHandleRepresentation(publicAPI, model) {
|
|
|
137
137
|
|
|
138
138
|
// --------------------------------------------------------------------------
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
const superSetGlyphResolution = publicAPI.setGlyphResolution;
|
|
141
|
+
publicAPI.setGlyphResolution = r => {
|
|
142
|
+
const res = superSetGlyphResolution(r);
|
|
143
|
+
model._pipeline.glyph.setPhiResolution(r);
|
|
144
|
+
model._pipeline.glyph.setThetaResolution(r);
|
|
145
|
+
return res;
|
|
146
|
+
};
|
|
141
147
|
|
|
142
148
|
// --------------------------------------------------------------------------
|
|
143
149
|
|
|
@@ -12,6 +12,9 @@ import { Resolve } from '../../Rendering/Core/Mapper/Static.js';
|
|
|
12
12
|
function vtkCircleContextRepresentation(publicAPI, model) {
|
|
13
13
|
// Set our className
|
|
14
14
|
model.classHierarchy.push('vtkCircleContextRepresentation');
|
|
15
|
+
const superClass = {
|
|
16
|
+
...publicAPI
|
|
17
|
+
};
|
|
15
18
|
|
|
16
19
|
// --------------------------------------------------------------------------
|
|
17
20
|
// Generic rendering pipeline
|
|
@@ -23,15 +26,27 @@ function vtkCircleContextRepresentation(publicAPI, model) {
|
|
|
23
26
|
|
|
24
27
|
// --------------------------------------------------------------------------
|
|
25
28
|
|
|
26
|
-
publicAPI.setGlyphResolution =
|
|
29
|
+
publicAPI.setGlyphResolution = r => {
|
|
30
|
+
const res = superClass.setGlyphResolution(r);
|
|
31
|
+
model._pipeline.glyph.setResolution(r);
|
|
32
|
+
return res;
|
|
33
|
+
};
|
|
27
34
|
|
|
28
35
|
// --------------------------------------------------------------------------
|
|
29
36
|
|
|
30
|
-
publicAPI.setDrawBorder =
|
|
37
|
+
publicAPI.setDrawBorder = draw => {
|
|
38
|
+
const res = superClass.setDrawBorder(draw);
|
|
39
|
+
model._pipeline.glyph.setLines(draw);
|
|
40
|
+
return res;
|
|
41
|
+
};
|
|
31
42
|
|
|
32
43
|
// --------------------------------------------------------------------------
|
|
33
44
|
|
|
34
|
-
publicAPI.setDrawFace =
|
|
45
|
+
publicAPI.setDrawFace = draw => {
|
|
46
|
+
const res = superClass.setDrawFace(draw);
|
|
47
|
+
model._pipeline.glyph.setFace(draw);
|
|
48
|
+
return res;
|
|
49
|
+
};
|
|
35
50
|
|
|
36
51
|
// --------------------------------------------------------------------------
|
|
37
52
|
|
|
@@ -112,11 +112,18 @@ function vtkSplineContextRepresentation(publicAPI, model) {
|
|
|
112
112
|
model._pipelines.border.actor.getProperty().setColor(...(inPoints.length <= 3 || model._pipelines.area.filter.getErrorCount() === 0 ? model.borderColor : model.errorBorderColor));
|
|
113
113
|
};
|
|
114
114
|
publicAPI.getSelectedState = (prop, compositeID) => model.state;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
const superSetFill = publicAPI.setFill;
|
|
116
|
+
publicAPI.setFill = fill => {
|
|
117
|
+
const res = superSetFill(fill);
|
|
118
|
+
model._pipelines.area.actor.setVisibility(fill);
|
|
119
|
+
return res;
|
|
120
|
+
};
|
|
121
|
+
const superSetOutputBorder = publicAPI.setOutputBorder;
|
|
122
|
+
publicAPI.setOutputBorder = v => {
|
|
123
|
+
const res = superSetOutputBorder(v);
|
|
124
|
+
model._pipelines.border.actor.setVisibility(v);
|
|
125
|
+
return res;
|
|
126
|
+
};
|
|
120
127
|
}
|
|
121
128
|
|
|
122
129
|
// ----------------------------------------------------------------------------
|
|
@@ -401,10 +401,13 @@ function vtkResliceCursorWidget(publicAPI, model) {
|
|
|
401
401
|
res[viewType] = findRepresentationsForViewType(viewType)[0]?.getDisplayScaleParams?.();
|
|
402
402
|
return res;
|
|
403
403
|
}, {});
|
|
404
|
-
|
|
404
|
+
const superSetScaleInPixels = publicAPI.setScaleInPixels;
|
|
405
|
+
publicAPI.setScaleInPixels = scale => {
|
|
406
|
+
const res = superSetScaleInPixels(scale);
|
|
405
407
|
publicAPI.getViewWidgets().forEach(w => w.setScaleInPixels(scale));
|
|
406
408
|
updateState(model.widgetState, model.scaleInPixels, model.rotationHandlePosition);
|
|
407
|
-
|
|
409
|
+
return res;
|
|
410
|
+
};
|
|
408
411
|
publicAPI.getPlaneExtremities = viewType => {
|
|
409
412
|
const dirProj = publicAPI.getWidgetState().getPlanes()[viewType].normal;
|
|
410
413
|
const length = vtkBoundingBox.getDiagonalLength(publicAPI.getWidgetState().getImage().getBounds());
|