@kitware/vtk.js 22.1.3 → 22.1.4
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/Filters/Sources/Arrow2DSource.js +1 -1
- package/Filters/Sources/ArrowSource.js +1 -1
- package/Filters/Sources/CircleSource.js +1 -1
- package/Filters/Sources/ConcentricCylinderSource.js +1 -1
- package/Filters/Sources/ConeSource.js +1 -1
- package/Filters/Sources/CubeSource.js +2 -2
- package/Filters/Sources/CylinderSource.js +1 -1
- package/Filters/Sources/LineSource.js +3 -3
- package/Filters/Sources/PlaneSource.js +4 -4
- package/Filters/Sources/PointSource.js +2 -2
- package/Filters/Sources/SLICSource.js +3 -3
- package/Filters/Sources/SphereSource.js +2 -2
- package/Filters/Sources/ViewFinderSource.js +1 -1
- package/package.json +1 -1
|
@@ -72,7 +72,7 @@ var DEFAULT_VALUES = {
|
|
|
72
72
|
shaftRadius: 0.03,
|
|
73
73
|
invert: false,
|
|
74
74
|
direction: [1.0, 0.0, 0.0],
|
|
75
|
-
pointType: '
|
|
75
|
+
pointType: 'Float64Array'
|
|
76
76
|
}; // ----------------------------------------------------------------------------
|
|
77
77
|
|
|
78
78
|
function extend(publicAPI, model) {
|
|
@@ -386,7 +386,7 @@ var DEFAULT_VALUES = {
|
|
|
386
386
|
skipInnerFaces: true,
|
|
387
387
|
mask: null,
|
|
388
388
|
// If present, array to know if a layer should be skipped(=true)
|
|
389
|
-
pointType: '
|
|
389
|
+
pointType: 'Float64Array'
|
|
390
390
|
}; // ----------------------------------------------------------------------------
|
|
391
391
|
|
|
392
392
|
function extend(publicAPI, model) {
|
|
@@ -81,7 +81,7 @@ var DEFAULT_VALUES = {
|
|
|
81
81
|
center: [0, 0, 0],
|
|
82
82
|
direction: [1.0, 0.0, 0.0],
|
|
83
83
|
capping: true,
|
|
84
|
-
pointType: '
|
|
84
|
+
pointType: 'Float64Array'
|
|
85
85
|
}; // ----------------------------------------------------------------------------
|
|
86
86
|
|
|
87
87
|
function extend(publicAPI, model) {
|
|
@@ -178,7 +178,7 @@ function vtkCubeSource(publicAPI, model) {
|
|
|
178
178
|
(_vtkMatrixBuilder$bui = vtkMatrixBuilder.buildFromRadian()).translate.apply(_vtkMatrixBuilder$bui, _toConsumableArray(model.center)).apply(points); // Define quads
|
|
179
179
|
|
|
180
180
|
|
|
181
|
-
var polys =
|
|
181
|
+
var polys = new Uint16Array(numberOfPolys * 5);
|
|
182
182
|
polyData.getPolys().setData(polys, 1);
|
|
183
183
|
var polyIndex = 0;
|
|
184
184
|
polys[polyIndex++] = 4;
|
|
@@ -247,7 +247,7 @@ var DEFAULT_VALUES = {
|
|
|
247
247
|
zLength: 1.0,
|
|
248
248
|
center: [0.0, 0.0, 0.0],
|
|
249
249
|
rotations: [0.0, 0.0, 0.0],
|
|
250
|
-
pointType: '
|
|
250
|
+
pointType: 'Float64Array',
|
|
251
251
|
generate3DTextureCoordinates: false
|
|
252
252
|
}; // ----------------------------------------------------------------------------
|
|
253
253
|
|
|
@@ -180,7 +180,7 @@ var DEFAULT_VALUES = {
|
|
|
180
180
|
center: [0, 0, 0],
|
|
181
181
|
direction: [0.0, 1.0, 0.0],
|
|
182
182
|
capping: true,
|
|
183
|
-
pointType: '
|
|
183
|
+
pointType: 'Float64Array'
|
|
184
184
|
}; // ----------------------------------------------------------------------------
|
|
185
185
|
|
|
186
186
|
function extend(publicAPI, model) {
|
|
@@ -17,9 +17,9 @@ function vtkLineSource(publicAPI, model) {
|
|
|
17
17
|
|
|
18
18
|
var dataset = outData[0]; // Check input
|
|
19
19
|
|
|
20
|
-
var pointDataType = dataset ? dataset.getPoints().getDataType() :
|
|
20
|
+
var pointDataType = dataset ? dataset.getPoints().getDataType() : model.pointType;
|
|
21
21
|
var pd = vtkPolyData.newInstance();
|
|
22
|
-
var v21 =
|
|
22
|
+
var v21 = [];
|
|
23
23
|
subtract(model.point2, model.point1, v21);
|
|
24
24
|
|
|
25
25
|
if (norm(v21) <= 0.0) {
|
|
@@ -68,7 +68,7 @@ var DEFAULT_VALUES = {
|
|
|
68
68
|
resolution: 10,
|
|
69
69
|
point1: [-1, 0, 0],
|
|
70
70
|
point2: [1, 0, 0],
|
|
71
|
-
pointType: '
|
|
71
|
+
pointType: 'Float64Array'
|
|
72
72
|
}; // ----------------------------------------------------------------------------
|
|
73
73
|
|
|
74
74
|
function extend(publicAPI, model) {
|
|
@@ -22,10 +22,10 @@ function vtkPlaneSource(publicAPI, model) {
|
|
|
22
22
|
|
|
23
23
|
var dataset = outData[0]; // Check input
|
|
24
24
|
|
|
25
|
-
var pointDataType = dataset ? dataset.getPoints().getDataType() :
|
|
25
|
+
var pointDataType = dataset ? dataset.getPoints().getDataType() : model.pointType;
|
|
26
26
|
var pd = vtkPolyData.newInstance();
|
|
27
|
-
var v10 =
|
|
28
|
-
var v20 =
|
|
27
|
+
var v10 = [];
|
|
28
|
+
var v20 = [];
|
|
29
29
|
subtract(model.point1, model.origin, v10);
|
|
30
30
|
subtract(model.point2, model.origin, v20);
|
|
31
31
|
|
|
@@ -242,7 +242,7 @@ var DEFAULT_VALUES = {
|
|
|
242
242
|
origin: [0, 0, 0],
|
|
243
243
|
point1: [1, 0, 0],
|
|
244
244
|
point2: [0, 1, 0],
|
|
245
|
-
pointType: '
|
|
245
|
+
pointType: 'Float64Array'
|
|
246
246
|
}; // ----------------------------------------------------------------------------
|
|
247
247
|
|
|
248
248
|
function extend(publicAPI, model) {
|
|
@@ -16,7 +16,7 @@ function vtkPointSource(publicAPI, model) {
|
|
|
16
16
|
|
|
17
17
|
var dataset = outData[0]; // Check input
|
|
18
18
|
|
|
19
|
-
var pointDataType = dataset ? dataset.getPoints().getDataType() :
|
|
19
|
+
var pointDataType = dataset ? dataset.getPoints().getDataType() : model.pointType;
|
|
20
20
|
var pd = vtkPolyData.newInstance(); // hand create a point cloud
|
|
21
21
|
|
|
22
22
|
var numPts = model.numberOfPoints; // Points
|
|
@@ -63,7 +63,7 @@ var DEFAULT_VALUES = {
|
|
|
63
63
|
numberOfPoints: 10,
|
|
64
64
|
center: [0, 0, 0],
|
|
65
65
|
radius: 0.5,
|
|
66
|
-
pointType: '
|
|
66
|
+
pointType: 'Float64Array'
|
|
67
67
|
}; // ----------------------------------------------------------------------------
|
|
68
68
|
|
|
69
69
|
function extend(publicAPI, model) {
|
|
@@ -7,7 +7,7 @@ import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
9
|
function generateCoordinates(origin, dimensions, spacing) {
|
|
10
|
-
var coordinates = new
|
|
10
|
+
var coordinates = new Float64Array(dimensions[0] * dimensions[1] * dimensions[2] * 3);
|
|
11
11
|
var offset = 0;
|
|
12
12
|
|
|
13
13
|
for (var k = 0; k < dimensions[2]; k++) {
|
|
@@ -37,7 +37,7 @@ function vtkSLICSource(publicAPI, model) {
|
|
|
37
37
|
|
|
38
38
|
publicAPI.addCluster = function (centerX, centerY, centerZ, fnConst, fnDfDx, fnDfDy, fnDfDz) {
|
|
39
39
|
var id = model.clusters.length;
|
|
40
|
-
model.clusters.push(new
|
|
40
|
+
model.clusters.push(new Float64Array([centerX, centerY, centerZ, fnConst, fnDfDx, fnDfDy, fnDfDz]));
|
|
41
41
|
publicAPI.modified();
|
|
42
42
|
return id;
|
|
43
43
|
};
|
|
@@ -54,7 +54,7 @@ function vtkSLICSource(publicAPI, model) {
|
|
|
54
54
|
|
|
55
55
|
publicAPI.updateCluster = function (id, centerX, centerY, centerZ, fnConst, fnDfDx, fnDfDy, fnDfDz) {
|
|
56
56
|
if (!model.clusters[id]) {
|
|
57
|
-
model.clusters[id] = new
|
|
57
|
+
model.clusters[id] = new Float64Array(7);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
model.clusters[id][0] = centerX;
|
|
@@ -15,7 +15,7 @@ function vtkSphereSource(publicAPI, model) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
var dataset = outData[0];
|
|
18
|
-
var pointDataType = dataset ? dataset.getPoints().getDataType() :
|
|
18
|
+
var pointDataType = dataset ? dataset.getPoints().getDataType() : model.pointType;
|
|
19
19
|
dataset = vtkPolyData.newInstance(); // ----------------------------------------------------------------------
|
|
20
20
|
|
|
21
21
|
var numPoles = 0; // Check data, determine increments, and convert to radians
|
|
@@ -180,7 +180,7 @@ var DEFAULT_VALUES = {
|
|
|
180
180
|
startPhi: 0.0,
|
|
181
181
|
endPhi: 180.0,
|
|
182
182
|
center: [0, 0, 0],
|
|
183
|
-
pointType: '
|
|
183
|
+
pointType: 'Float64Array'
|
|
184
184
|
}; // ----------------------------------------------------------------------------
|
|
185
185
|
|
|
186
186
|
function extend(publicAPI, model) {
|