@kitware/vtk.js 22.6.1 → 23.1.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/Common/Core/CellArray.d.ts +2 -2
- package/Common/Core/DataArray.d.ts +2 -2
- package/Common/Core/Endian.d.ts +3 -1
- package/Common/Core/ImageHelper.d.ts +1 -1
- package/Common/Core/LookupTable.d.ts +2 -2
- package/Common/Core/Math.d.ts +1 -1
- package/Common/Core/MatrixBuilder.d.ts +1 -1
- package/Common/Core/Points.d.ts +2 -2
- package/Common/Core/PriorityQueue.d.ts +1 -1
- package/Common/Core/ProgressHandler.d.ts +1 -1
- package/Common/Core/ScalarsToColors.d.ts +3 -3
- package/Common/Core/StringArray.d.ts +1 -1
- package/Common/Core/VariantArray.d.ts +1 -1
- package/Common/DataModel/Box.d.ts +2 -2
- package/Common/DataModel/CardinalSpline1D.d.ts +2 -2
- package/Common/DataModel/Cell.d.ts +3 -3
- package/Common/DataModel/Cone.d.ts +2 -2
- package/Common/DataModel/Cylinder.d.ts +2 -2
- package/Common/DataModel/DataSet.d.ts +2 -2
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +1 -1
- package/Common/DataModel/DataSetAttributes.d.ts +3 -3
- package/Common/DataModel/ITKHelper.js +16 -20
- package/Common/DataModel/ImageData.d.ts +36 -36
- package/Common/DataModel/KochanekSpline1D.d.ts +1 -1
- package/Common/DataModel/Line.d.ts +2 -2
- package/Common/DataModel/PiecewiseFunction.d.ts +2 -2
- package/Common/DataModel/Plane.d.ts +2 -2
- package/Common/DataModel/PointSet.d.ts +3 -3
- package/Common/DataModel/PolyData.d.ts +3 -3
- package/Common/DataModel/Polygon.d.ts +2 -2
- package/Common/DataModel/SelectionNode.d.ts +2 -2
- package/Common/DataModel/Sphere.d.ts +2 -2
- package/Common/DataModel/Spline1D.d.ts +1 -1
- package/Common/DataModel/Spline3D.d.ts +1 -1
- package/Common/DataModel/Triangle.d.ts +2 -2
- package/Common/Transform/LandmarkTransform.d.ts +2 -2
- package/Filters/General/AppendPolyData.d.ts +1 -1
- package/Filters/General/ImageCropFilter.d.ts +1 -1
- package/Filters/General/ImageOutlineFilter.d.ts +1 -1
- package/Filters/General/ImageSliceFilter.d.ts +2 -2
- package/Filters/General/ImageStreamline.d.ts +135 -0
- package/Filters/General/LineFilter.d.ts +1 -1
- package/Filters/General/OutlineFilter.d.ts +1 -1
- package/Filters/General/TriangleFilter.d.ts +1 -1
- package/Filters/General/TubeFilter.d.ts +2 -2
- package/Filters/Sources/Arrow2DSource.d.ts +2 -2
- package/Filters/Sources/ArrowSource.d.ts +2 -2
- package/Filters/Sources/CircleSource.d.ts +2 -2
- package/Filters/Sources/ConeSource.d.ts +2 -2
- package/Filters/Sources/CubeSource.d.ts +2 -2
- package/Filters/Sources/Cursor3D.d.ts +3 -3
- package/Filters/Sources/CylinderSource.d.ts +2 -2
- package/Filters/Sources/LineSource.d.ts +2 -2
- package/Filters/Sources/PlaneSource.d.ts +2 -2
- package/Filters/Sources/PointSource.d.ts +2 -2
- package/Filters/Sources/SphereSource.d.ts +2 -2
- package/Filters/Texture/TextureMapToPlane.d.ts +1 -1
- package/Filters/Texture/TextureMapToSphere.d.ts +1 -1
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +13 -0
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper.d.ts +32 -0
- package/IO/Core/HttpDataSetReader.d.ts +226 -0
- package/IO/Core/HttpSceneLoader.d.ts +5 -5
- package/IO/Core/ImageStream/DefaultProtocol.d.ts +1 -1
- package/IO/Core/ImageStream/ViewStream.d.ts +4 -4
- package/IO/Core/ImageStream.d.ts +3 -3
- package/IO/Core/WSLinkClient.d.ts +1 -1
- package/IO/Geometry/DracoReader.d.ts +13 -9
- package/IO/Geometry/PLYReader.d.ts +13 -9
- package/IO/Geometry/PLYWriter.d.ts +2 -2
- package/IO/Geometry/STLReader.d.ts +14 -9
- package/IO/Geometry/STLWriter.d.ts +2 -2
- package/IO/Misc/ElevationReader.d.ts +11 -6
- package/IO/Misc/ITKImageReader.d.ts +1 -1
- package/IO/Misc/ITKPolyDataReader.d.ts +1 -1
- package/IO/Misc/JSONNucleoReader.d.ts +13 -9
- package/IO/Misc/JSONReader.d.ts +4 -4
- package/IO/Misc/MTLReader.d.ts +11 -7
- package/IO/Misc/OBJReader.d.ts +10 -6
- package/IO/Misc/PDBReader.d.ts +10 -6
- package/IO/XML/XMLImageDataReader.d.ts +1 -1
- package/IO/XML/XMLPolyDataReader.d.ts +1 -1
- package/IO/XML/XMLReader.d.ts +20 -16
- package/Interaction/Manipulators/MouseRangeManipulator.js +55 -1
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +22 -8
- package/Interaction/Widgets/OrientationMarkerWidget.js +62 -37
- package/Rendering/Core/AbstractMapper.d.ts +2 -2
- package/Rendering/Core/AbstractMapper3D.d.ts +2 -2
- package/Rendering/Core/AbstractPicker.d.ts +4 -4
- package/Rendering/Core/Actor.d.ts +21 -18
- package/Rendering/Core/Actor2D.d.ts +5 -5
- package/Rendering/Core/AnnotatedCubeActor.d.ts +1 -1
- package/Rendering/Core/AxesActor.d.ts +1 -1
- package/Rendering/Core/Camera.d.ts +2 -2
- package/Rendering/Core/CellPicker.d.ts +5 -5
- package/Rendering/Core/ColorTransferFunction.d.ts +1 -1
- package/Rendering/Core/Coordinate.d.ts +2 -2
- package/Rendering/Core/Follower.d.ts +2 -2
- package/Rendering/Core/Glyph3DMapper.d.ts +2 -2
- package/Rendering/Core/ImageMapper.d.ts +3 -3
- package/Rendering/Core/ImageProperty.d.ts +11 -2
- package/Rendering/Core/ImageProperty.js +3 -2
- package/Rendering/Core/ImageSlice.d.ts +4 -4
- package/Rendering/Core/Light.d.ts +2 -2
- package/Rendering/Core/Mapper.d.ts +5 -5
- package/Rendering/Core/Mapper2D.d.ts +4 -3
- package/Rendering/Core/Picker.d.ts +5 -5
- package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +2 -2
- package/Rendering/Core/PointPicker.d.ts +3 -3
- package/Rendering/Core/Prop.d.ts +5 -5
- package/Rendering/Core/Prop3D.d.ts +2 -2
- package/Rendering/Core/Property.d.ts +2 -2
- package/Rendering/Core/Property2D.d.ts +2 -2
- package/Rendering/Core/RenderWindow.d.ts +4 -4
- package/Rendering/Core/RenderWindowInteractor.d.ts +2 -2
- package/Rendering/Core/Renderer.d.ts +17 -16
- package/Rendering/Core/ScalarBarActor.d.ts +3 -3
- package/Rendering/Core/Skybox.d.ts +1 -1
- package/Rendering/Core/SphereMapper.d.ts +1 -1
- package/Rendering/Core/StickMapper.d.ts +1 -1
- package/Rendering/Core/Texture.d.ts +1 -1
- package/Rendering/Core/Viewport.d.ts +4 -4
- package/Rendering/Core/Volume.d.ts +4 -4
- package/Rendering/Core/VolumeMapper.d.ts +2 -2
- package/Rendering/Core/VolumeProperty.d.ts +1 -1
- package/Rendering/Misc/CanvasView.d.ts +2 -2
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +8 -8
- package/Rendering/Misc/GenericRenderWindow.d.ts +6 -6
- package/Rendering/Misc/RemoteView.d.ts +3 -3
- package/Rendering/Misc/RenderWindowWithControlBar.d.ts +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +4 -3
- package/Rendering/Misc/TextureLODsDownloader.d.ts +4 -4
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/RenderWindow.d.ts +18 -18
- package/Rendering/OpenGL/VolumeMapper.js +16 -1
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/RenderPass.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNode.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNodeFactory.d.ts +1 -1
- package/Rendering/WebGPU/HardwareSelectionPass.js +0 -1
- package/Rendering/WebGPU/ImageMapper.js +1 -1
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -3
- package/Rendering/WebGPU/RenderEncoder.js +1 -4
- package/Widgets/Core/AbstractWidgetFactory.js +5 -3
- package/Widgets/Manipulators/LineManipulator.d.ts +1 -1
- package/Widgets/Manipulators/PlaneManipulator.d.ts +1 -1
- package/Widgets/Manipulators/TrackballManipulator.d.ts +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +1 -1
- package/Widgets/Representations/WidgetRepresentation.d.ts +1 -1
- package/index.d.ts +7 -0
- package/interfaces.d.ts +4 -4
- package/macros.d.ts +1 -1
- package/package.json +1 -1
- package/types.d.ts +22 -1
- package/vtk.d.ts +7 -2
|
@@ -85,7 +85,6 @@ function vtkWebGPUHardwareSelectionPass(publicAPI, model) {
|
|
|
85
85
|
});
|
|
86
86
|
var renDesc = model.selectionRenderEncoder.getDescription();
|
|
87
87
|
renDesc.colorAttachments[0].clearValue = [0.0, 0.0, 0.0, 0.0];
|
|
88
|
-
renDesc.depthStencilAttachment.stencilLoadOp = 'load';
|
|
89
88
|
model.selectionRenderEncoder.setPipelineSettings({
|
|
90
89
|
primitive: {
|
|
91
90
|
cullMode: 'none'
|
|
@@ -183,7 +183,7 @@ function vtkWebGPUImageMapper(publicAPI, model) {
|
|
|
183
183
|
var target = iComps ? i : 0;
|
|
184
184
|
var cfun = actor.getProperty().getRGBTransferFunction(target);
|
|
185
185
|
|
|
186
|
-
if (cfun) {
|
|
186
|
+
if (cfun && actor.getProperty().getUseLookupTableScalarRange()) {
|
|
187
187
|
var cRange = cfun.getRange();
|
|
188
188
|
cw = cRange[1] - cRange[0];
|
|
189
189
|
cl = 0.5 * (cRange[1] + cRange[0]);
|
|
@@ -108,9 +108,7 @@ function vtkWebGPUOrderIndependentTranslucentPass(publicAPI, model) {
|
|
|
108
108
|
rDesc.depthStencilAttachment = {
|
|
109
109
|
view: undefined,
|
|
110
110
|
depthLoadOp: 'load',
|
|
111
|
-
depthStoreOp: 'store'
|
|
112
|
-
stencilLoadOp: 'load',
|
|
113
|
-
stencilStoreOp: 'store'
|
|
111
|
+
depthStoreOp: 'store'
|
|
114
112
|
};
|
|
115
113
|
model.translucentRenderEncoder.setReplaceShaderCodeFunction(function (pipeline) {
|
|
116
114
|
var fDesc = pipeline.getShaderDescription('fragment');
|
|
@@ -145,10 +145,7 @@ function extend(publicAPI, model) {
|
|
|
145
145
|
view: undefined,
|
|
146
146
|
depthLoadOp: 'clear',
|
|
147
147
|
depthClearValue: 0.0,
|
|
148
|
-
depthStoreOp: 'store'
|
|
149
|
-
stencilLoadOp: 'clear',
|
|
150
|
-
stencilClearValue: 0,
|
|
151
|
-
stencilStoreOp: 'store'
|
|
148
|
+
depthStoreOp: 'store'
|
|
152
149
|
}
|
|
153
150
|
}; // default shader code just writes out the computedColor
|
|
154
151
|
|
|
@@ -189,9 +189,11 @@ function vtkAbstractWidgetFactory(publicAPI, model) {
|
|
|
189
189
|
}); // Defer after object instantiation so model.widgetState actually exist
|
|
190
190
|
|
|
191
191
|
setTimeout(function () {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
if (model.widgetState) {
|
|
193
|
+
unsubscribe = model.widgetState.onModified(function () {
|
|
194
|
+
return publicAPI.invokeWidgetChange(model.widgetState);
|
|
195
|
+
}).unsubscribe;
|
|
196
|
+
}
|
|
195
197
|
}, 0);
|
|
196
198
|
} // ----------------------------------------------------------------------------
|
|
197
199
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {vtkWidgetRepresentation, IWidgetRepresentationInitialValues} from '
|
|
1
|
+
import {vtkWidgetRepresentation, IWidgetRepresentationInitialValues} from './WidgetRepresentation';
|
|
2
2
|
|
|
3
3
|
export interface IResliceCursorContextRepresentationInitialValues extends IWidgetRepresentationInitialValues {
|
|
4
4
|
axis1Name?: string,
|
package/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
/// <reference path="./Filters/General/ImageCropFilter.d.ts" />
|
|
44
44
|
/// <reference path="./Filters/General/ImageOutlineFilter.d.ts" />
|
|
45
45
|
/// <reference path="./Filters/General/ImageSliceFilter.d.ts" />
|
|
46
|
+
/// <reference path="./Filters/General/ImageStreamline.d.ts" />
|
|
46
47
|
/// <reference path="./Filters/General/LineFilter.d.ts" />
|
|
47
48
|
/// <reference path="./Filters/General/OutlineFilter.d.ts" />
|
|
48
49
|
/// <reference path="./Filters/General/TriangleFilter.d.ts" />
|
|
@@ -61,6 +62,12 @@
|
|
|
61
62
|
/// <reference path="./Filters/Texture/TextureMapToPlane.d.ts" />
|
|
62
63
|
/// <reference path="./Filters/Texture/TextureMapToSphere.d.ts" />
|
|
63
64
|
/// <reference path="./Interaction/Widgets/OrientationMarkerWidget.d.ts" />
|
|
65
|
+
/// <reference path="./IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts" />
|
|
66
|
+
/// <reference path="./IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts" />
|
|
67
|
+
/// <reference path="./IO/Core/DataAccessHelper.d.ts" />
|
|
68
|
+
/// <reference path="./IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts" />
|
|
69
|
+
/// <reference path="./IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts" />
|
|
70
|
+
/// <reference path="./IO/Core/HttpDataSetReader.d.ts" />
|
|
64
71
|
/// <reference path="./IO/Core/HttpSceneLoader.d.ts" />
|
|
65
72
|
/// <reference path="./IO/Core/ImageStream/DefaultProtocol.d.ts" />
|
|
66
73
|
/// <reference path="./IO/Core/ImageStream.d.ts" />
|
package/interfaces.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import vtkDataArray from '
|
|
2
|
-
import vtkImageData from '
|
|
3
|
-
import vtkPolyData from '
|
|
4
|
-
import { vtkPipelineConnection } from '
|
|
1
|
+
import vtkDataArray from '././Common/Core/DataArray';
|
|
2
|
+
import vtkImageData from '././Common/DataModel/ImageData';
|
|
3
|
+
import vtkPolyData from '././Common/DataModel/PolyData';
|
|
4
|
+
import { vtkPipelineConnection } from '././types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Object returned on any subscription call
|
package/macros.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vtkSubscription, vtkDebouncedFunction, vtkProperty, vtkPropertyDomain } from '
|
|
1
|
+
import { vtkSubscription, vtkDebouncedFunction, vtkProperty, vtkPropertyDomain } from '././interfaces';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Allow user to redefine vtkXXXMacro method call.
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import { vtkOutputPort } from '
|
|
1
|
+
import { vtkOutputPort } from '././interfaces';
|
|
2
|
+
|
|
3
|
+
/** Alias type for value that can be null */
|
|
4
|
+
declare type Nullable<T> = T | null;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Alias type for number that are floats
|
|
8
|
+
* @ignorenaming
|
|
9
|
+
*/
|
|
10
|
+
declare type float = number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Alias type for number that are doubles.
|
|
14
|
+
* @ignorenaming
|
|
15
|
+
*/
|
|
16
|
+
declare type double = number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Alias type for number that are integer
|
|
20
|
+
* @ignorenaming
|
|
21
|
+
*/
|
|
22
|
+
declare type int = number;
|
|
2
23
|
|
|
3
24
|
declare type TypedArray =
|
|
4
25
|
| number[]
|
package/vtk.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
interface IvtkObject {
|
|
2
|
+
vtkClass: string;
|
|
3
|
+
[attrName: string]: unknown;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
*
|
|
3
8
|
* @param obj
|
|
4
9
|
* @return
|
|
5
10
|
*/
|
|
6
|
-
declare function vtk(obj:
|
|
11
|
+
declare function vtk(obj: IvtkObject): unknown;
|
|
7
12
|
|
|
8
13
|
/**
|
|
9
14
|
* Nest register method under the vtk function
|
|
10
15
|
* @param vtkClassName
|
|
11
16
|
* @param constructor
|
|
12
17
|
*/
|
|
13
|
-
declare function register(vtkClassName: string, constructor:
|
|
18
|
+
declare function register(vtkClassName: string, constructor: unknown): void;
|
|
14
19
|
|
|
15
20
|
export default vtk;
|