@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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import vtkImageData from '../../Common/DataModel/ImageData';
|
|
2
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
3
|
+
import { Bounds, Extent, Vector2, Vector3 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface IImageStreamlineInitialValues {
|
|
9
|
+
integrationStep?: number,
|
|
10
|
+
maximumNumberOfSteps?: number,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type vtkImageStreamlineBase = vtkObject & vtkAlgorithm;
|
|
14
|
+
|
|
15
|
+
export interface vtkImageStreamline extends vtkImageStreamlineBase {
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param velArray
|
|
20
|
+
* @param image
|
|
21
|
+
* @param {Number} delT
|
|
22
|
+
* @param {Number[]} xyz
|
|
23
|
+
*/
|
|
24
|
+
computeNextStep(velArray: any, image: any, delT: number, xyz: number[]): boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {Vector3} x
|
|
29
|
+
* @param {Vector3} ijk
|
|
30
|
+
* @param {Vector3} pcoords
|
|
31
|
+
* @param {Extent} extent
|
|
32
|
+
* @param {Vector3} spacing
|
|
33
|
+
* @param {Vector3} origin
|
|
34
|
+
* @param {Bounds} bounds
|
|
35
|
+
*/
|
|
36
|
+
computeStructuredCoordinates(x: Vector3, ijk: Vector3, pcoords: Vector3, extent: Extent, spacing: Vector3, origin: Vector3, bounds: Bounds): boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get the step length (delT) used during integration.
|
|
40
|
+
*/
|
|
41
|
+
getIntegrationStep(): number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get the number of steps to be used in the integration.
|
|
45
|
+
*/
|
|
46
|
+
getMaximumNumberOfSteps(): number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @param {Vector3} ijk
|
|
51
|
+
* @param {Vector2} dims
|
|
52
|
+
* @param {Number[]} ids
|
|
53
|
+
*/
|
|
54
|
+
getVoxelIndices(ijk: Vector3, dims: Vector2, ids: number[]): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param {Vector3} pcoords
|
|
59
|
+
* @param {Number[]} sf
|
|
60
|
+
*/
|
|
61
|
+
interpolationFunctions(pcoords: Vector3, sf: number[]): void;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param inData
|
|
65
|
+
* @param outData
|
|
66
|
+
*/
|
|
67
|
+
requestData(inData: any, outData: any): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Set the step length (delT) used during integration.
|
|
71
|
+
* @param {Number} integrationStep
|
|
72
|
+
*/
|
|
73
|
+
setIntegrationStep(integrationStep: number): boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Set the number of steps to be used in the integration.
|
|
77
|
+
* Integration can terminal earlier if the streamline leaves the domain.
|
|
78
|
+
* @param {Number} maximumNumberOfSteps
|
|
79
|
+
*/
|
|
80
|
+
setMaximumNumberOfSteps(maximumNumberOfSteps: number): boolean;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @param velArray
|
|
85
|
+
* @param {vtkImageData} image
|
|
86
|
+
* @param {Number[]} seed
|
|
87
|
+
* @param {Number} offset
|
|
88
|
+
*/
|
|
89
|
+
streamIntegrate(velArray: any, image: vtkImageData, seed: number[], offset: number): any[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @param {Number[]} xyz
|
|
94
|
+
* @param velArray
|
|
95
|
+
* @param {vtkImageData} image
|
|
96
|
+
* @param velAtArg
|
|
97
|
+
*/
|
|
98
|
+
vectorAt(xyz: number[], velArray: any, image: vtkImageData, velAtArg: any): boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Method used to decorate a given object (publicAPI+model) with vtkImageStreamline characteristics.
|
|
103
|
+
*
|
|
104
|
+
* @param publicAPI object on which methods will be bounds (public)
|
|
105
|
+
* @param model object on which data structure will be bounds (protected)
|
|
106
|
+
* @param {IImageStreamlineInitialValues} [initialValues] (default: {})
|
|
107
|
+
*/
|
|
108
|
+
export function extend(publicAPI: object, model: object, initialValues?: IImageStreamlineInitialValues): void;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Method used to create a new instance of vtkImageStreamline
|
|
112
|
+
* @param {IImageStreamlineInitialValues} [initialValues] for pre-setting some of its content
|
|
113
|
+
*/
|
|
114
|
+
export function newInstance(initialValues?: IImageStreamlineInitialValues): vtkImageStreamline;
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* vtkImageStreamline - integrate streamlines in a vtkImageData
|
|
119
|
+
*
|
|
120
|
+
* vtkImageStreamline is a filter that generates streamlines from a vtkImageData
|
|
121
|
+
* input over which a vector field is defined. This filter will look for vectors
|
|
122
|
+
* (i.e. getVectors()) in the input. It will then integrate these vectors, using
|
|
123
|
+
* Runge-Kutta 2, from a starting set of seeds defined by the points of the 2nd
|
|
124
|
+
* input until a specified maximum number of steps is reached or until the
|
|
125
|
+
* streamline leaves the domain.
|
|
126
|
+
*
|
|
127
|
+
* The output will be a vtkPolyData which contains a polyline for each
|
|
128
|
+
* streamline. Currently, this filter does not interpolate any input fields to
|
|
129
|
+
* the points of the streamline.
|
|
130
|
+
*/
|
|
131
|
+
export declare const vtkImageStreamline: {
|
|
132
|
+
newInstance: typeof newInstance;
|
|
133
|
+
extend: typeof extend;
|
|
134
|
+
}
|
|
135
|
+
export default vtkImageStreamline;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
2
|
-
import { DesiredOutputPrecision } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import { DesiredOutputPrecision } from '../../Common/DataModel/DataSetAttributes';
|
|
3
3
|
|
|
4
4
|
export enum VaryRadius {
|
|
5
5
|
VARY_RADIUS_OFF,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
2
|
-
import vtkPolyData from '
|
|
3
|
-
import { Bounds, Vector3 } from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkPolyData from '../../Common/DataModel/PolyData';
|
|
3
|
+
import { Bounds, Vector3 } from '../../types';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { vec3 } from 'gl-matrix';
|
|
2
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
3
|
-
import { Vector3 } from '
|
|
2
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
3
|
+
import { Vector3 } from '../../types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface HtmlDataAccessHelper {
|
|
2
|
+
fetchArray(instance: any, baseURL: string, array: object[], options?: object): Promise<object[]>;
|
|
3
|
+
fetchJSON(instance: any, url: string, options?: object): Promise<object>;
|
|
4
|
+
fetchText(instance: any, url: string, options?: object): Promise<string>;
|
|
5
|
+
fetchBinary(instance: any, url: string, options?: object): Promise<ArrayBuffer>;
|
|
6
|
+
fetchImage(instance: any, url: string, options?: object): Promise<HTMLImageElement>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default HtmlDataAccessHelper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface HttpDataAccessHelper {
|
|
2
|
+
fetchArray(instance: any, baseURL: string, array: object[], options?: object): Promise<object[]>;
|
|
3
|
+
fetchJSON(instance: any, url: string, options?: object): Promise<object>;
|
|
4
|
+
fetchText(instance: any, url: string, options?: object): Promise<string>;
|
|
5
|
+
fetchBinary(instance: any, url: string, options?: object): Promise<ArrayBuffer>;
|
|
6
|
+
fetchImage(instance: any, url: string, options?: object): Promise<HTMLImageElement>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default HttpDataAccessHelper;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface IJSZipDataAccessHelper {
|
|
2
|
+
fetchArray(instance: any, baseURL: string, array: object[], options?: object): Promise<object[]>;
|
|
3
|
+
fetchJSON(instance: any, url: string, options?: object): Promise<object>;
|
|
4
|
+
fetchText(instance: any, url: string, options?: object): Promise<string>;
|
|
5
|
+
fetchBinary(instance: any, url: string, options?: object): Promise<ArrayBuffer>;
|
|
6
|
+
fetchImage(instance: any, url: string, options?: object): Promise<HTMLImageElement>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface JSZipDataAccessHelper {
|
|
10
|
+
create(createOptions: object): IJSZipDataAccessHelper
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default JSZipDataAccessHelper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface LiteHttpDataAccessHelper {
|
|
2
|
+
fetchArray(instance: any, baseURL: string, array: object[], options?: object): Promise<object[]>;
|
|
3
|
+
fetchJSON(instance: any, url: string, options?: object): Promise<object>;
|
|
4
|
+
fetchText(instance: any, url: string, options?: object): Promise<string>;
|
|
5
|
+
fetchBinary(instance: any, url: string, options?: object): Promise<ArrayBuffer>;
|
|
6
|
+
fetchImage(instance: any, url: string, options?: object): Promise<HTMLImageElement>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default LiteHttpDataAccessHelper;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import HtmlDataAccessHelper from '././HtmlDataAccessHelper';
|
|
2
|
+
import HttpDataAccessHelper from '././HttpDataAccessHelper';
|
|
3
|
+
import JSZipDataAccessHelper from '././JSZipDataAccessHelper';
|
|
4
|
+
import LiteHttpDataAccessHelper from '././LiteHttpDataAccessHelper';
|
|
5
|
+
|
|
6
|
+
export function has(type: string): boolean;
|
|
7
|
+
export function get(type?: string, options?: object): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper
|
|
8
|
+
export function registerType(type: string, fn: any): void;
|
|
9
|
+
|
|
10
|
+
export interface DataAccessHelper {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param {String} type
|
|
14
|
+
*/
|
|
15
|
+
has(type: string): boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param {String} type
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
22
|
+
get(type?: string, options?: object): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param {String} type
|
|
27
|
+
* @param fn
|
|
28
|
+
*/
|
|
29
|
+
registerType(type: string, fn: any): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default DataAccessHelper;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { vtkAlgorithm, vtkObject, vtkSubscription } from '../../interfaces';
|
|
2
|
+
import HtmlDataAccessHelper from './DataAccessHelper/HtmlDataAccessHelper';
|
|
3
|
+
import HttpDataAccessHelper from './DataAccessHelper/HttpDataAccessHelper';
|
|
4
|
+
import JSZipDataAccessHelper from './DataAccessHelper/JSZipDataAccessHelper';
|
|
5
|
+
import LiteHttpDataAccessHelper from './DataAccessHelper/LiteHttpDataAccessHelper';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export interface IHttpDataSetReaderInitialValues {
|
|
11
|
+
enableArray?: boolean;
|
|
12
|
+
fetchGzip?: boolean;
|
|
13
|
+
arrays?: any[];
|
|
14
|
+
url?: string;
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
requestCount?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IHttpDataSetReaderOptions {
|
|
20
|
+
fullpath?: string,
|
|
21
|
+
compression?: string,
|
|
22
|
+
loadData?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IHttpDataSetReaderArray {
|
|
26
|
+
location: string;
|
|
27
|
+
name: string;
|
|
28
|
+
enable: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type vtkHttpDataSetReaderBase = vtkObject & Omit<vtkAlgorithm,
|
|
32
|
+
| 'getInputData'
|
|
33
|
+
| 'setInputData'
|
|
34
|
+
| 'setInputConnection'
|
|
35
|
+
| 'getInputConnection'
|
|
36
|
+
| 'addInputConnection'
|
|
37
|
+
| 'addInputData'>;
|
|
38
|
+
|
|
39
|
+
export interface vtkHttpDataSetReader extends vtkHttpDataSetReaderBase {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Enable or disable a given array.
|
|
43
|
+
*
|
|
44
|
+
* ```js
|
|
45
|
+
* reader.enableArray('pointData', 'Temperature');
|
|
46
|
+
* reader.enableArray('pointData', 'Pressure', false);
|
|
47
|
+
* reader.enableArray('cellData', 'CellId', true);
|
|
48
|
+
* reader.enableArray('fieldData', 'labels', true);
|
|
49
|
+
* ```
|
|
50
|
+
* @param {String} location
|
|
51
|
+
* @param {String} name
|
|
52
|
+
* @param {Boolean} [enable]
|
|
53
|
+
*/
|
|
54
|
+
enableArray(location: string, name: string, enable?: boolean): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Get the list of available array with their location and if they are
|
|
58
|
+
* enable or not for download using the __update()__ method.
|
|
59
|
+
*/
|
|
60
|
+
getArrays(): IHttpDataSetReaderArray[];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
getArraysByReference(): IHttpDataSetReaderArray[];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get the base url to use to download arrays or other data from the given
|
|
69
|
+
* dataset.
|
|
70
|
+
*
|
|
71
|
+
* ```js
|
|
72
|
+
* reader.setURL('/Data/can.ex2/index.json');
|
|
73
|
+
*
|
|
74
|
+
* if (reader.getBaseURL() === '/Data/can.ex2') {
|
|
75
|
+
* console.log('Good guess...');
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
getBaseURL(): string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
getDataAccessHelper(): HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
getEnableArray(): boolean;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
getFetchGzip(): boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Get the url of the object to load.
|
|
98
|
+
*/
|
|
99
|
+
getUrl(): string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @param {Boolean} busy
|
|
104
|
+
*/
|
|
105
|
+
invokeBusy(busy: boolean): void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get the current status of the reader. True means busy and False means
|
|
109
|
+
* idle.
|
|
110
|
+
*/
|
|
111
|
+
isBusy(): boolean;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
loadData(): string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Attach listener to monitor when the reader is downloading data or not.
|
|
120
|
+
*
|
|
121
|
+
* ```js
|
|
122
|
+
* const subscription = reader.onBusy(busy => {
|
|
123
|
+
* console.log('Reader is', busy ? 'downloading' : 'idle');
|
|
124
|
+
* })
|
|
125
|
+
*
|
|
126
|
+
* reader.update();
|
|
127
|
+
* // much later
|
|
128
|
+
* subscription.unsubscribe();
|
|
129
|
+
* ```
|
|
130
|
+
* @param callback
|
|
131
|
+
*/
|
|
132
|
+
onBusy(callback: (busy: boolean) => any): vtkSubscription;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @param inData
|
|
137
|
+
* @param outData
|
|
138
|
+
*/
|
|
139
|
+
requestData(inData: any, outData: any): void;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param dataAccessHelper
|
|
144
|
+
*/
|
|
145
|
+
setDataAccessHelper(dataAccessHelper: HtmlDataAccessHelper | HttpDataAccessHelper | JSZipDataAccessHelper | LiteHttpDataAccessHelper): boolean;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @param progressCallback
|
|
150
|
+
*/
|
|
151
|
+
setProgressCallback(progressCallback: any): boolean;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Set the url for the dataset to load.
|
|
155
|
+
*
|
|
156
|
+
* ```js
|
|
157
|
+
* const reader = HttpDataSetReader.newInstance();
|
|
158
|
+
* isReady = reader.setURL('/Data/can.ex2/index.json');
|
|
159
|
+
*
|
|
160
|
+
* // Same as
|
|
161
|
+
* const reader = HttpDataSetReader.newInstance({ url: '/Data/can.ex2/index.json' });
|
|
162
|
+
* isReady = reader.updateMetadata();
|
|
163
|
+
* ```
|
|
164
|
+
* @param {String} url the url of the object to load.
|
|
165
|
+
* @param {IHttpDataSetReaderOptions} [option] The Draco reader options.
|
|
166
|
+
*/
|
|
167
|
+
setUrl(url: string, option?: IHttpDataSetReaderOptions): Promise<any>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
updateMetadata(): Promise<any>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Method used to decorate a given object (publicAPI+model) with vtkHttpDataSetReader characteristics.
|
|
177
|
+
*
|
|
178
|
+
* @param publicAPI object on which methods will be bounds (public)
|
|
179
|
+
* @param model object on which data structure will be bounds (protected)
|
|
180
|
+
* @param {IHttpDataSetReaderInitialValues} [initialValues] (default: {})
|
|
181
|
+
*/
|
|
182
|
+
export function extend(publicAPI: object, model: object, initialValues?: IHttpDataSetReaderInitialValues): void;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Method used to create a new instance of vtkHttpDataSetReader while enabling a
|
|
186
|
+
* default behavior regarding the data array and the way they should be fetched
|
|
187
|
+
* from the server.
|
|
188
|
+
*
|
|
189
|
+
* The __enableArray__ argument allow you to choose if you want to activate all
|
|
190
|
+
* data array by default or if you will have to manually enable them before
|
|
191
|
+
* downloading them.
|
|
192
|
+
* @param {IHttpDataSetReaderInitialValues} [initialValues] for pre-setting some of its content
|
|
193
|
+
*/
|
|
194
|
+
export function newInstance(initialValues?: IHttpDataSetReaderInitialValues): vtkHttpDataSetReader;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The vtkHttpDataSetReader is using a custom format that only exist in vtk.js
|
|
198
|
+
* which aims to simplify data fetching in an HTTP context. Basically the format
|
|
199
|
+
* is composed of a JSON metadata file referencing all the required data array
|
|
200
|
+
* as side binary files along with all the dataset configuration (i.e.: type,
|
|
201
|
+
* extent...).
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```js
|
|
205
|
+
* import vtkHttpDataSetReader from '@kitware/vtk.js/IO/Core/HttpDataSetReader';
|
|
206
|
+
*
|
|
207
|
+
* const reader = vtkHttpDataSetReader.newInstance();
|
|
208
|
+
* reader.setURL('/Data/can.ex2/index.json').then((reader, dataset) => {
|
|
209
|
+
* console.log('Metadata loaded with the geometry', dataset);
|
|
210
|
+
*
|
|
211
|
+
* reader.getArrays().forEach(array => {
|
|
212
|
+
* console.log('-', array.name, array.location, ':', array.enable);
|
|
213
|
+
* });
|
|
214
|
+
*
|
|
215
|
+
* reader.update()
|
|
216
|
+
* .then((reader, dataset) => {
|
|
217
|
+
* console.log('dataset fully loaded', dataset);
|
|
218
|
+
* });
|
|
219
|
+
* });
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
export declare const vtkHttpDataSetReader: {
|
|
223
|
+
newInstance: typeof newInstance,
|
|
224
|
+
extend: typeof extend,
|
|
225
|
+
};
|
|
226
|
+
export default vtkHttpDataSetReader;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import vtkAnnotatedCubeActor from '
|
|
3
|
-
import vtkAxesActor from '
|
|
4
|
-
import vtkRenderer from '
|
|
5
|
-
import vtkRenderWindowInteractor from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkAnnotatedCubeActor from '../../Rendering/Core/AnnotatedCubeActor';
|
|
3
|
+
import vtkAxesActor from '../../Rendering/Core/AxesActor';
|
|
4
|
+
import vtkRenderer from '../../Rendering/Core/Renderer';
|
|
5
|
+
import vtkRenderWindowInteractor from '../../Rendering/Core/RenderWindowInteractor';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import { Size } from '
|
|
3
|
-
import vtkCamera from '
|
|
4
|
-
import DefaultProtocol from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import { Size } from '../../types';
|
|
3
|
+
import vtkCamera from '../../Rendering/Core/Camera';
|
|
4
|
+
import DefaultProtocol from '././DefaultProtocol';
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
*/
|
package/IO/Core/ImageStream.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import { Size } from '
|
|
3
|
-
import vtkViewStream from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import { Size } from '../../types';
|
|
3
|
+
import vtkViewStream from '././ViewStream';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|