@kitware/vtk.js 32.4.0 → 32.5.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.
Files changed (36) hide show
  1. package/Common/Core/Math/index.js +12 -1
  2. package/Common/Core/Math.d.ts +5 -0
  3. package/Common/Core/Math.js +1 -1
  4. package/IO/Image/HDRReader/Utils.js +44 -0
  5. package/IO/Image/HDRReader.d.ts +121 -0
  6. package/IO/Image/HDRReader.js +373 -0
  7. package/IO/Image.js +7 -0
  8. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
  9. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  10. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
  11. package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
  12. package/Proxy/Core/View2DProxy.js +1 -1
  13. package/Rendering/Core/AbstractImageMapper.js +1 -1
  14. package/Rendering/Core/AbstractMapper3D.js +1 -1
  15. package/Rendering/Core/ColorTransferFunction/CssFilters.js +1 -1
  16. package/Rendering/Core/ColorTransferFunction.js +1 -1
  17. package/Rendering/Core/Coordinate.js +1 -1
  18. package/Rendering/Core/CubeAxesActor.js +1 -1
  19. package/Rendering/Core/Glyph3DMapper.js +1 -1
  20. package/Rendering/Core/ImageArrayMapper.js +1 -1
  21. package/Rendering/Core/ImageMapper.js +1 -1
  22. package/Rendering/Core/Mapper.js +1 -1
  23. package/Rendering/Core/Prop3D.js +1 -1
  24. package/Rendering/Core/RenderWindowInteractor.js +1 -1
  25. package/Rendering/Core/Renderer.js +1 -1
  26. package/Rendering/Core/ScalarBarActor.js +1 -1
  27. package/Rendering/Core/VolumeMapper.js +1 -1
  28. package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
  29. package/Rendering/OpenGL/Texture.js +1 -1
  30. package/Widgets/Representations/PolyLineRepresentation.js +1 -1
  31. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  32. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  33. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  34. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  35. package/index.d.ts +1 -0
  36. package/package.json +1 -1
@@ -53,6 +53,15 @@ function createArray() {
53
53
  return res;
54
54
  }
55
55
  const Pi = () => Math.PI;
56
+ function ldexp(x, exponent) {
57
+ if (exponent > 1023) {
58
+ return x * 2 ** 1023 * 2 ** (exponent - 1023);
59
+ }
60
+ if (exponent < -1074) {
61
+ return x * 2 ** -1074 * 2 ** (exponent + 1074);
62
+ }
63
+ return x * 2 ** exponent;
64
+ }
56
65
  function radiansFromDegrees(deg) {
57
66
  return deg / 180 * Math.PI;
58
67
  }
@@ -2012,6 +2021,7 @@ function float2CssRGBA(rgbArray) {
2012
2021
 
2013
2022
  var vtkMath = {
2014
2023
  Pi,
2024
+ ldexp,
2015
2025
  radiansFromDegrees,
2016
2026
  degreesFromRadians,
2017
2027
  round,
@@ -2128,6 +2138,7 @@ var vtkMath$1 = /*#__PURE__*/Object.freeze({
2128
2138
  __proto__: null,
2129
2139
  createArray: createArray,
2130
2140
  Pi: Pi,
2141
+ ldexp: ldexp,
2131
2142
  radiansFromDegrees: radiansFromDegrees,
2132
2143
  degreesFromRadians: degreesFromRadians,
2133
2144
  round: round,
@@ -2245,4 +2256,4 @@ var vtkMath$1 = /*#__PURE__*/Object.freeze({
2245
2256
  'default': vtkMath
2246
2257
  });
2247
2258
 
2248
- export { arrayMin as $, degreesFromRadians as A, areEquals as B, clampValue as C, arrayRange as D, getMajorAxisIndex as E, createUninitializedBounds as F, identity as G, multiplyMatrix as H, floor as I, isInf as J, rgb2hsv as K, rgb2lab as L, lab2rgb as M, round as N, normalize2D as O, nearestPowerOfTwo as P, multiply3x3_vect3 as Q, getSparseOrthogonalMatrix as R, areBoundsInitialized as S, isPowerOfTwo as T, angleBetweenVectors as U, signedAngleBetweenVectors as V, createArray as W, Pi as X, ceil as Y, min as Z, max as _, areMatricesEqual as a, float2CssRGBA as a$, arrayMax as a0, ceilLog2 as a1, factorial as a2, binomial as a3, beginCombination as a4, nextCombination as a5, randomSeed as a6, getSeed as a7, gaussian as a8, multiplyScalar2D as a9, diagonalize3x3 as aA, singularValueDecomposition3x3 as aB, luFactorLinearSystem as aC, luSolveLinearSystem as aD, invertMatrix as aE, estimateMatrixCondition as aF, solveHomogeneousLeastSquares as aG, solveLeastSquares as aH, hex2float as aI, lab2xyz as aJ, xyz2lab as aK, xyz2rgb as aL, rgb2xyz as aM, computeBoundsFromPoints as aN, clampAndNormalizeValue as aO, getScalarTypeFittingRange as aP, getAdjustedScalarRange as aQ, extentIsWithinOtherExtent as aR, boundsIsWithinOtherBounds as aS, pointIsWithinBounds as aT, solve3PointCircle as aU, inf as aV, negInf as aW, isFinite as aX, isNaN as aY, floatToHex2 as aZ, floatRGB2HexCode as a_, multiplyAccumulate2D as aa, outer as ab, projectVector as ac, dot2D as ad, projectVector2D as ae, gaussianAmplitude as af, gaussianWeight as ag, outer2D as ah, norm2D as ai, rowsToMat4 as aj, columnsToMat4 as ak, columnsToMat3 as al, LUFactor3x3 as am, LUSolve3x3 as an, linearSolve3x3 as ao, multiply3x3_mat3 as ap, transpose3x3 as aq, invert3x3 as ar, identity3x3 as as, isIdentity as at, isIdentity3x3 as au, quaternionToMatrix3x3 as av, roundNumber as aw, matrix3x3ToQuaternion as ax, multiplyQuaternion as ay, orthogonalize3x3 as az, roundVector as b, clampVector as c, dot as d, distance2BetweenPoints as e, vtkMath as f, solveLinearSystem as g, hsv2rgb as h, isNan as i, cross as j, add as k, normalize as l, multiplyAccumulate as m, norm as n, determinant2x2 as o, jacobiN as p, perpendiculars as q, radiansFromDegrees as r, subtract as s, jacobi as t, uninitializeBounds as u, vtkMath$1 as v, multiplyScalar as w, random as x, determinant3x3 as y, rowsToMat3 as z };
2259
+ export { min as $, ldexp as A, xyz2rgb as B, degreesFromRadians as C, areEquals as D, clampValue as E, arrayRange as F, getMajorAxisIndex as G, createUninitializedBounds as H, identity as I, multiplyMatrix as J, floor as K, isInf as L, rgb2hsv as M, rgb2lab as N, lab2rgb as O, round as P, normalize2D as Q, nearestPowerOfTwo as R, multiply3x3_vect3 as S, getSparseOrthogonalMatrix as T, areBoundsInitialized as U, isPowerOfTwo as V, angleBetweenVectors as W, signedAngleBetweenVectors as X, createArray as Y, Pi as Z, ceil as _, areMatricesEqual as a, floatRGB2HexCode as a$, max as a0, arrayMin as a1, arrayMax as a2, ceilLog2 as a3, factorial as a4, binomial as a5, beginCombination as a6, nextCombination as a7, randomSeed as a8, getSeed as a9, multiplyQuaternion as aA, orthogonalize3x3 as aB, diagonalize3x3 as aC, singularValueDecomposition3x3 as aD, luFactorLinearSystem as aE, luSolveLinearSystem as aF, invertMatrix as aG, estimateMatrixCondition as aH, solveHomogeneousLeastSquares as aI, solveLeastSquares as aJ, hex2float as aK, lab2xyz as aL, xyz2lab as aM, rgb2xyz as aN, computeBoundsFromPoints as aO, clampAndNormalizeValue as aP, getScalarTypeFittingRange as aQ, getAdjustedScalarRange as aR, extentIsWithinOtherExtent as aS, boundsIsWithinOtherBounds as aT, pointIsWithinBounds as aU, solve3PointCircle as aV, inf as aW, negInf as aX, isFinite as aY, isNaN as aZ, floatToHex2 as a_, gaussian as aa, multiplyScalar2D as ab, multiplyAccumulate2D as ac, outer as ad, projectVector as ae, dot2D as af, projectVector2D as ag, gaussianAmplitude as ah, gaussianWeight as ai, outer2D as aj, norm2D as ak, rowsToMat4 as al, columnsToMat4 as am, columnsToMat3 as an, LUFactor3x3 as ao, LUSolve3x3 as ap, linearSolve3x3 as aq, multiply3x3_mat3 as ar, transpose3x3 as as, invert3x3 as at, identity3x3 as au, isIdentity as av, isIdentity3x3 as aw, quaternionToMatrix3x3 as ax, roundNumber as ay, matrix3x3ToQuaternion as az, roundVector as b, float2CssRGBA as b0, clampVector as c, dot as d, distance2BetweenPoints as e, vtkMath as f, solveLinearSystem as g, hsv2rgb as h, isNan as i, cross as j, add as k, normalize as l, multiplyAccumulate as m, norm as n, determinant2x2 as o, jacobiN as p, perpendiculars as q, radiansFromDegrees as r, subtract as s, jacobi as t, uninitializeBounds as u, vtkMath$1 as v, multiplyScalar as w, random as x, determinant3x3 as y, rowsToMat3 as z };
@@ -51,6 +51,11 @@ export function swapColumnsMatrix_nxn(
51
51
  */
52
52
  export function Pi(): number;
53
53
 
54
+ /**
55
+ * Calculates x times (2 to the power of exponent).
56
+ */
57
+ export function ldexp(x: number, exponent: number): number;
58
+
54
59
  /**
55
60
  * Convert degrees to radians.
56
61
  * @param {Number} deg The value in degrees.
@@ -1,4 +1,4 @@
1
1
  import 'seedrandom';
2
2
  import '../../macros2.js';
3
3
  import './Math/Constants.js';
4
- export { am as LUFactor3x3, an as LUSolve3x3, X as Pi, k as add, U as angleBetweenVectors, S as areBoundsInitialized, B as areEquals, a as areMatricesEqual, a0 as arrayMax, $ as arrayMin, D as arrayRange, a4 as beginCombination, a3 as binomial, aS as boundsIsWithinOtherBounds, Y as ceil, a1 as ceilLog2, aO as clampAndNormalizeValue, C as clampValue, c as clampVector, al as columnsToMat3, ak as columnsToMat4, aN as computeBoundsFromPoints, W as createArray, F as createUninitializedBounds, j as cross, f as default, A as degreesFromRadians, o as determinant2x2, y as determinant3x3, aA as diagonalize3x3, e as distance2BetweenPoints, d as dot, ad as dot2D, aF as estimateMatrixCondition, aR as extentIsWithinOtherExtent, a2 as factorial, a$ as float2CssRGBA, a_ as floatRGB2HexCode, aZ as floatToHex2, I as floor, a8 as gaussian, af as gaussianAmplitude, ag as gaussianWeight, aQ as getAdjustedScalarRange, E as getMajorAxisIndex, aP as getScalarTypeFittingRange, a7 as getSeed, R as getSparseOrthogonalMatrix, aI as hex2float, h as hsv2rgb, G as identity, as as identity3x3, aV as inf, ar as invert3x3, aE as invertMatrix, aX as isFinite, at as isIdentity, au as isIdentity3x3, J as isInf, aY as isNaN, i as isNan, T as isPowerOfTwo, t as jacobi, p as jacobiN, M as lab2rgb, aJ as lab2xyz, ao as linearSolve3x3, aC as luFactorLinearSystem, aD as luSolveLinearSystem, ax as matrix3x3ToQuaternion, _ as max, Z as min, ap as multiply3x3_mat3, Q as multiply3x3_vect3, m as multiplyAccumulate, aa as multiplyAccumulate2D, H as multiplyMatrix, ay as multiplyQuaternion, w as multiplyScalar, a9 as multiplyScalar2D, P as nearestPowerOfTwo, aW as negInf, a5 as nextCombination, n as norm, ai as norm2D, l as normalize, O as normalize2D, az as orthogonalize3x3, ab as outer, ah as outer2D, q as perpendiculars, aT as pointIsWithinBounds, ac as projectVector, ae as projectVector2D, av as quaternionToMatrix3x3, r as radiansFromDegrees, x as random, a6 as randomSeed, K as rgb2hsv, L as rgb2lab, aM as rgb2xyz, N as round, aw as roundNumber, b as roundVector, z as rowsToMat3, aj as rowsToMat4, V as signedAngleBetweenVectors, aB as singularValueDecomposition3x3, aU as solve3PointCircle, aG as solveHomogeneousLeastSquares, aH as solveLeastSquares, g as solveLinearSystem, s as subtract, aq as transpose3x3, u as uninitializeBounds, aK as xyz2lab, aL as xyz2rgb } from './Math/index.js';
4
+ export { ao as LUFactor3x3, ap as LUSolve3x3, Z as Pi, k as add, W as angleBetweenVectors, U as areBoundsInitialized, D as areEquals, a as areMatricesEqual, a2 as arrayMax, a1 as arrayMin, F as arrayRange, a6 as beginCombination, a5 as binomial, aT as boundsIsWithinOtherBounds, _ as ceil, a3 as ceilLog2, aP as clampAndNormalizeValue, E as clampValue, c as clampVector, an as columnsToMat3, am as columnsToMat4, aO as computeBoundsFromPoints, Y as createArray, H as createUninitializedBounds, j as cross, f as default, C as degreesFromRadians, o as determinant2x2, y as determinant3x3, aC as diagonalize3x3, e as distance2BetweenPoints, d as dot, af as dot2D, aH as estimateMatrixCondition, aS as extentIsWithinOtherExtent, a4 as factorial, b0 as float2CssRGBA, a$ as floatRGB2HexCode, a_ as floatToHex2, K as floor, aa as gaussian, ah as gaussianAmplitude, ai as gaussianWeight, aR as getAdjustedScalarRange, G as getMajorAxisIndex, aQ as getScalarTypeFittingRange, a9 as getSeed, T as getSparseOrthogonalMatrix, aK as hex2float, h as hsv2rgb, I as identity, au as identity3x3, aW as inf, at as invert3x3, aG as invertMatrix, aY as isFinite, av as isIdentity, aw as isIdentity3x3, L as isInf, aZ as isNaN, i as isNan, V as isPowerOfTwo, t as jacobi, p as jacobiN, O as lab2rgb, aL as lab2xyz, A as ldexp, aq as linearSolve3x3, aE as luFactorLinearSystem, aF as luSolveLinearSystem, az as matrix3x3ToQuaternion, a0 as max, $ as min, ar as multiply3x3_mat3, S as multiply3x3_vect3, m as multiplyAccumulate, ac as multiplyAccumulate2D, J as multiplyMatrix, aA as multiplyQuaternion, w as multiplyScalar, ab as multiplyScalar2D, R as nearestPowerOfTwo, aX as negInf, a7 as nextCombination, n as norm, ak as norm2D, l as normalize, Q as normalize2D, aB as orthogonalize3x3, ad as outer, aj as outer2D, q as perpendiculars, aU as pointIsWithinBounds, ae as projectVector, ag as projectVector2D, ax as quaternionToMatrix3x3, r as radiansFromDegrees, x as random, a8 as randomSeed, M as rgb2hsv, N as rgb2lab, aN as rgb2xyz, P as round, ay as roundNumber, b as roundVector, z as rowsToMat3, al as rowsToMat4, X as signedAngleBetweenVectors, aD as singularValueDecomposition3x3, aV as solve3PointCircle, aI as solveHomogeneousLeastSquares, aJ as solveLeastSquares, g as solveLinearSystem, s as subtract, as as transpose3x3, u as uninitializeBounds, aM as xyz2lab, B as xyz2rgb } from './Math/index.js';
@@ -0,0 +1,44 @@
1
+ import { A as ldexp } from '../../../Common/Core/Math/index.js';
2
+
3
+ /**
4
+ * Read a line from a Uint8Array
5
+ * @param {Uint8Array} uint8array
6
+ * @param {number} startIndex
7
+ * @returns string
8
+ */
9
+ function readLine(uint8array, startIndex) {
10
+ let line = '';
11
+ let character = '';
12
+ for (let i = startIndex; i < uint8array.length - startIndex; i++) {
13
+ character = String.fromCharCode(uint8array[i]);
14
+ if (character === '\n') {
15
+ break;
16
+ }
17
+ line += character;
18
+ }
19
+ return line;
20
+ }
21
+
22
+ /**
23
+ * Convert rgbe to float
24
+ * @param {Array} rgbe The rgbe array
25
+ * @param {Array} floats The output array
26
+ * @param {number} exposure The exposure value
27
+ */
28
+ function rgbe2float(rgbe, exposure) {
29
+ let floats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
30
+ if (rgbe[3] > 0) {
31
+ /* nonzero pixel */
32
+ const f = ldexp(1.0, rgbe[3] - (128 + 8)) / exposure;
33
+ floats[0] = rgbe[0] * f;
34
+ floats[1] = rgbe[1] * f;
35
+ floats[2] = rgbe[2] * f;
36
+ } else {
37
+ floats[0] = 0;
38
+ floats[1] = 0;
39
+ floats[2] = 0;
40
+ }
41
+ return floats;
42
+ }
43
+
44
+ export { readLine, rgbe2float };
@@ -0,0 +1,121 @@
1
+ import { vtkAlgorithm, vtkObject } from './../../interfaces';
2
+ import HtmlDataAccessHelper from './../Core/DataAccessHelper/HtmlDataAccessHelper';
3
+ import HttpDataAccessHelper from './../Core/DataAccessHelper/HttpDataAccessHelper';
4
+ import JSZipDataAccessHelper from './../Core/DataAccessHelper/JSZipDataAccessHelper';
5
+ import LiteHttpDataAccessHelper from './../Core/DataAccessHelper/LiteHttpDataAccessHelper';
6
+
7
+ interface IHDRReaderOptions {
8
+ compression?: string;
9
+ progressCallback?: any;
10
+ }
11
+
12
+ /**
13
+ *
14
+ */
15
+ export interface IHDRReaderInitialValues {}
16
+
17
+ type vtkHDRReaderBase = vtkObject &
18
+ Omit<
19
+ vtkAlgorithm,
20
+ | 'getInputData'
21
+ | 'setInputData'
22
+ | 'setInputConnection'
23
+ | 'getInputConnection'
24
+ | 'addInputConnection'
25
+ | 'addInputData'
26
+ >;
27
+
28
+ export interface vtkHDRReader extends vtkHDRReaderBase {
29
+ /**
30
+ * Get the base url.
31
+ */
32
+ getBaseURL(): string;
33
+
34
+ /**
35
+ * Get the dataAccess helper.
36
+ */
37
+ getDataAccessHelper():
38
+ | HtmlDataAccessHelper
39
+ | HttpDataAccessHelper
40
+ | JSZipDataAccessHelper
41
+ | LiteHttpDataAccessHelper;
42
+
43
+ /**
44
+ * Get the url of the object to load.
45
+ */
46
+ getUrl(): string;
47
+
48
+ /**
49
+ * Load the object data.
50
+ * @param {IHDRReaderOptions} [options]
51
+ */
52
+ loadData(options?: IHDRReaderOptions): Promise<any>;
53
+
54
+ /**
55
+ * Parse data.
56
+ * @param {ArrayBuffer} content The content to parse.
57
+ */
58
+ parse(content: ArrayBuffer): void;
59
+
60
+ /**
61
+ * Parse data as ArrayBuffer.
62
+ * @param {ArrayBuffer} content The content to parse.
63
+ */
64
+ parseAsArrayBuffer(content: ArrayBuffer): void;
65
+
66
+ /**
67
+ *
68
+ * @param inData
69
+ * @param outData
70
+ */
71
+ requestData(inData: any, outData: any): void;
72
+
73
+ /**
74
+ *
75
+ * @param dataAccessHelper
76
+ */
77
+ setDataAccessHelper(
78
+ dataAccessHelper:
79
+ | HtmlDataAccessHelper
80
+ | HttpDataAccessHelper
81
+ | JSZipDataAccessHelper
82
+ | LiteHttpDataAccessHelper
83
+ ): boolean;
84
+
85
+ /**
86
+ * Set the url of the object to load.
87
+ * @param {String} url the url of the object to load.
88
+ * @param {IHDRReaderOptions} [option] The PLY reader options.
89
+ */
90
+ setUrl(url: string, option?: IHDRReaderOptions): Promise<string | any>;
91
+ }
92
+
93
+ /**
94
+ * Method used to decorate a given object (publicAPI+model) with vtkHDRReader characteristics.
95
+ *
96
+ * @param publicAPI object on which methods will be bounds (public)
97
+ * @param model object on which data structure will be bounds (protected)
98
+ * @param {IHDRReaderInitialValues} [initialValues] (default: {})
99
+ */
100
+ export function extend(
101
+ publicAPI: object,
102
+ model: object,
103
+ initialValues?: IHDRReaderInitialValues
104
+ ): void;
105
+
106
+ /**
107
+ * Method used to create a new instance of vtkHDRReader
108
+ * @param {IHDRReaderInitialValues} [initialValues] for pre-setting some of its content
109
+ */
110
+ export function newInstance(
111
+ initialValues?: IHDRReaderInitialValues
112
+ ): vtkHDRReader;
113
+
114
+ /**
115
+ * vtkHDRReader is a source object that reads Radiance HDR files.
116
+ */
117
+ export declare const vtkHDRReader: {
118
+ newInstance: typeof newInstance;
119
+ extend: typeof extend;
120
+ };
121
+ export default vtkHDRReader;
@@ -0,0 +1,373 @@
1
+ import '../Core/DataAccessHelper/LiteHttpDataAccessHelper.js';
2
+ import { m as macro } from '../../macros2.js';
3
+ import DataAccessHelper from '../Core/DataAccessHelper.js';
4
+ import { B as xyz2rgb } from '../../Common/Core/Math/index.js';
5
+ import vtkImageData from '../../Common/DataModel/ImageData.js';
6
+ import vtkDataArray from '../../Common/Core/DataArray.js';
7
+ import { readLine, rgbe2float } from './HDRReader/Utils.js';
8
+
9
+ /* eslint-disable no-bitwise */
10
+ const {
11
+ vtkErrorMacro
12
+ } = macro;
13
+ const FormatType = {
14
+ FORMAT_32BIT_RLE_RGBE: 0,
15
+ FORMAT_32BIT_RLE_XYZE: 1
16
+ };
17
+ const Patterns = {
18
+ magicToken: /^#\?(\S+)/,
19
+ gamma: /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,
20
+ exposure: /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,
21
+ format: /^\s*FORMAT=(\S+)\s*$/,
22
+ dimensions: /^\s*-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/
23
+ };
24
+
25
+ // ----------------------------------------------------------------------------
26
+ // vtkHDRReader methods
27
+ // ----------------------------------------------------------------------------
28
+
29
+ function vtkHDRReader(publicAPI, model) {
30
+ // Set our className
31
+ model.classHierarchy.push('vtkHDRReader');
32
+
33
+ /**
34
+ * Reads header information from an RGBE texture stored in a native array.
35
+ * More information on this format are available here:
36
+ * https://en.wikipedia.org/wiki/RGBE_image_format
37
+ *
38
+ * @param {Uint8Array} uint8array The binary file stored in native array.
39
+ * @returns The header information.
40
+ */
41
+ function readHeader(uint8array) {
42
+ // RGBE format header
43
+ const header = {
44
+ valid: 0,
45
+ string: '',
46
+ comments: '',
47
+ programtype: 'RGBE',
48
+ format: '',
49
+ gamma: 1.0,
50
+ exposure: 1.0,
51
+ pixelAspect: 1.0,
52
+ width: 0,
53
+ height: 0,
54
+ dataIndex: 0
55
+ };
56
+ let match;
57
+ let line = readLine(uint8array, 0);
58
+ match = line.match(Patterns.magicToken);
59
+ if (!match) {
60
+ throw new Error('Bad HDR Format.');
61
+ }
62
+ header.programtype = match[1];
63
+ header.string += `${line}\n`;
64
+ let lineIndex = 0;
65
+ do {
66
+ lineIndex += line.length + 1;
67
+ line = readLine(uint8array, lineIndex);
68
+ header.string += `${line}\n`;
69
+ if (line.charAt(0) === '#') {
70
+ header.comments += `${line}\n`;
71
+ // eslint-disable-next-line no-continue
72
+ continue; // comment line
73
+ }
74
+
75
+ match = line.match(Patterns.gamma);
76
+ if (match) {
77
+ header.gamma = parseFloat(match[1]);
78
+ }
79
+ match = line.match(Patterns.exposure);
80
+ if (match) {
81
+ header.exposure = parseFloat(match[1]);
82
+ }
83
+ match = line.match(Patterns.format);
84
+ if (match) {
85
+ header.format = match[1];
86
+ }
87
+ } while (line.length !== 0);
88
+ lineIndex += line.length + 1;
89
+ line = readLine(uint8array, lineIndex);
90
+ match = line.match(Patterns.dimensions);
91
+ if (match) {
92
+ header.height = parseInt(match[1], 10);
93
+ header.width = parseInt(match[2], 10);
94
+ }
95
+ if (header.width < 8 || header.width > 0x7fff) {
96
+ vtkErrorMacro('HDR Bad header format, unsupported size');
97
+ }
98
+ lineIndex += line.length + 1;
99
+ header.dataIndex = lineIndex;
100
+ return header;
101
+ }
102
+
103
+ /**
104
+ *
105
+ * @param {Uint8Array} uint8array
106
+ * @param {*} header
107
+ * @returns Float32Array
108
+ */
109
+ function readRGBEPixelsNotRLE(uint8array, header) {
110
+ // this file is not run length encoded
111
+ // read values sequentially
112
+
113
+ let numScanlines = header.height;
114
+ const scanlineWidth = header.width;
115
+ let a;
116
+ let b;
117
+ let c;
118
+ let d;
119
+ let i;
120
+ let dataIndex = header.dataIndex;
121
+
122
+ // 3 channels of 4 bytes per pixel in float.
123
+ const resultBuffer = new ArrayBuffer(header.width * header.height * 4 * 3);
124
+ const resultArray = new Float32Array(resultBuffer);
125
+
126
+ // read in each successive scanline
127
+ while (numScanlines > 0) {
128
+ for (i = 0; i < header.width; i++) {
129
+ a = uint8array[dataIndex++];
130
+ b = uint8array[dataIndex++];
131
+ c = uint8array[dataIndex++];
132
+ d = uint8array[dataIndex++];
133
+ const offset = (numScanlines - 1) * scanlineWidth * 3 + i * 3;
134
+ let output = [];
135
+ const input = [a, b, c, d];
136
+ if (model.format === FormatType.FORMAT_32BIT_RLE_XYZE) {
137
+ // convert from XYZE to RGBE
138
+ xyz2rgb(input, output);
139
+ } else {
140
+ output = rgbe2float(input, model.exposure);
141
+ }
142
+ resultArray[offset] = output[0];
143
+ resultArray[offset + 1] = output[1];
144
+ resultArray[offset + 2] = output[2];
145
+ }
146
+ numScanlines--;
147
+ }
148
+ return resultArray;
149
+ }
150
+
151
+ /**
152
+ *
153
+ * @param {Uint8Array} uint8array
154
+ * @param {*} header
155
+ * @returns Float32Array
156
+ */
157
+ function readRGBEPixelsRLE(uint8array, header) {
158
+ let numScanlines = header.height;
159
+ const scanlineWidth = header.width;
160
+ let a;
161
+ let b;
162
+ let c;
163
+ let d;
164
+ let count;
165
+ let dataIndex = header.dataIndex;
166
+ let index = 0;
167
+ let endIndex = 0;
168
+ let i = 0;
169
+ const scanLineArrayBuffer = new ArrayBuffer(scanlineWidth * 4); // four channel R G B E
170
+ const scanLineArray = new Uint8Array(scanLineArrayBuffer);
171
+
172
+ // 3 channels of 4 bytes per pixel in float.
173
+ const resultBuffer = new ArrayBuffer(header.width * header.height * 4 * 3);
174
+ const resultArray = new Float32Array(resultBuffer);
175
+
176
+ // read in each successive scanline
177
+ while (numScanlines > 0) {
178
+ a = uint8array[dataIndex++];
179
+ b = uint8array[dataIndex++];
180
+ c = uint8array[dataIndex++];
181
+ d = uint8array[dataIndex++];
182
+ if (a !== 2 || b !== 2 || c & 0x80 || header.width < 8 || header.width > 32767) {
183
+ return readRGBEPixelsNotRLE(uint8array, header);
184
+ }
185
+ if ((c << 8 | d) !== scanlineWidth) {
186
+ vtkErrorMacro('HDR Bad header format, wrong scan line width');
187
+ }
188
+ index = 0;
189
+
190
+ // read each of the four channels for the scanline into the buffer
191
+ for (i = 0; i < 4; i++) {
192
+ endIndex = (i + 1) * scanlineWidth;
193
+ while (index < endIndex) {
194
+ a = uint8array[dataIndex++];
195
+ b = uint8array[dataIndex++];
196
+ if (a > 128) {
197
+ // A run of the same value
198
+ count = a - 128;
199
+ if (count === 0 || count > endIndex - index) {
200
+ vtkErrorMacro('HDR Bad Format, bad scanline data (run)');
201
+ }
202
+ while (count-- > 0) {
203
+ scanLineArray[index++] = b;
204
+ }
205
+ } else {
206
+ // A non run
207
+ count = a;
208
+ if (count === 0 || count > endIndex - index) {
209
+ vtkErrorMacro('HDR Bad Format, bad scanline data (non-run)');
210
+ }
211
+ scanLineArray[index++] = b;
212
+ if (--count > 0) {
213
+ for (let j = 0; j < count; j++) {
214
+ scanLineArray[index++] = uint8array[dataIndex++];
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+
221
+ // now convert data from buffer into floats
222
+ for (i = 0; i < scanlineWidth; i++) {
223
+ a = scanLineArray[i];
224
+ b = scanLineArray[i + scanlineWidth];
225
+ c = scanLineArray[i + 2 * scanlineWidth];
226
+ d = scanLineArray[i + 3 * scanlineWidth];
227
+ const offset = (numScanlines - 1) * scanlineWidth * 3 + i * 3;
228
+ let output = [];
229
+ const input = [a, b, c, d];
230
+ if (model.format === FormatType.FORMAT_32BIT_RLE_XYZE) {
231
+ // convert from XYZE to RGBE
232
+ xyz2rgb(input, output);
233
+ } else {
234
+ output = rgbe2float(input, model.exposure);
235
+ }
236
+ resultArray[offset] = output[0];
237
+ resultArray[offset + 1] = output[1];
238
+ resultArray[offset + 2] = output[2];
239
+ }
240
+ numScanlines--;
241
+ }
242
+ return resultArray;
243
+ }
244
+
245
+ // Create default dataAccessHelper if not available
246
+ if (!model.dataAccessHelper) {
247
+ model.dataAccessHelper = DataAccessHelper.get('http');
248
+ }
249
+
250
+ // Internal method to fetch Array
251
+ function fetchData(url) {
252
+ const {
253
+ compression,
254
+ progressCallback
255
+ } = model;
256
+ return model.dataAccessHelper.fetchBinary(url, {
257
+ compression,
258
+ progressCallback
259
+ });
260
+ }
261
+
262
+ // Set DataSet url
263
+ publicAPI.setUrl = function (url) {
264
+ let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
265
+ binary: true
266
+ };
267
+ model.url = url;
268
+
269
+ // Remove the file in the URL
270
+ const path = url.split('/');
271
+ path.pop();
272
+ model.baseURL = path.join('/');
273
+ model.compression = option.compression;
274
+
275
+ // Fetch metadata
276
+ return publicAPI.loadData({
277
+ progressCallback: option.progressCallback
278
+ });
279
+ };
280
+
281
+ // Fetch the actual data arrays
282
+ publicAPI.loadData = function () {
283
+ const promise = fetchData(model.url);
284
+ promise.then(publicAPI.parse);
285
+ return promise;
286
+ };
287
+ publicAPI.parse = content => {
288
+ publicAPI.parseAsArrayBuffer(content);
289
+ };
290
+ publicAPI.parseAsArrayBuffer = content => {
291
+ if (!content) {
292
+ return;
293
+ }
294
+ model.parseData = content;
295
+ const data = new Uint8Array(model.parseData);
296
+ const header = readHeader(data);
297
+ if (header.format === '32-bit_rle_rgbe') {
298
+ model.format = FormatType.FORMAT_32BIT_RLE_RGBE;
299
+ } else if (header.format === '32-bit_rle_xyze') {
300
+ model.format = FormatType.FORMAT_32BIT_RLE_XYZE;
301
+ }
302
+ model.gamma = header.gamma;
303
+ model.exposure = header.exposure;
304
+ model.pixelAspect = header.pixelAspect;
305
+ const output = readRGBEPixelsRLE(data, header);
306
+ const dataExtent = [0, header.width - 1, 0, header.height - 1];
307
+ const dataSpacing = [1, header.pixelAspect, 1];
308
+ const imageData = vtkImageData.newInstance();
309
+ imageData.setDimensions(header.width, header.height, 1);
310
+ imageData.setExtent(dataExtent);
311
+ imageData.setSpacing(dataSpacing);
312
+ const dataArray = vtkDataArray.newInstance({
313
+ name: 'HDRImage',
314
+ numberOfComponents: 3,
315
+ values: output
316
+ });
317
+ imageData.getPointData().setScalars(dataArray);
318
+ model.output[0] = imageData;
319
+ };
320
+ publicAPI.requestData = (inData, outData) => {
321
+ publicAPI.parse(model.parseData);
322
+ };
323
+ }
324
+
325
+ // ----------------------------------------------------------------------------
326
+ // Object factory
327
+ // ----------------------------------------------------------------------------
328
+
329
+ const DEFAULT_VALUES = {
330
+ gamma: 1.0,
331
+ exposure: 1.0,
332
+ pixelAspect: 1.0,
333
+ format: FormatType.FORMAT_32BIT_RLE_RGBE
334
+ };
335
+
336
+ // ----------------------------------------------------------------------------
337
+
338
+ function extend(publicAPI, model) {
339
+ let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
340
+ Object.assign(model, DEFAULT_VALUES, initialValues);
341
+
342
+ // Make this a VTK object
343
+ macro.obj(publicAPI, model);
344
+
345
+ // Also make it an algorithm with one input and one output
346
+ macro.algo(publicAPI, model, 0, 1);
347
+ macro.get(publicAPI, model, ['gamma', 'exposure', 'pixelAspect', 'url', 'baseURL']);
348
+ macro.setGet(publicAPI, model, ['dataAccessHelper']);
349
+
350
+ // Object specific methods
351
+ vtkHDRReader(publicAPI, model);
352
+
353
+ // To support destructuring
354
+ if (!model.compression) {
355
+ model.compression = null;
356
+ }
357
+ if (!model.progressCallback) {
358
+ model.progressCallback = null;
359
+ }
360
+ }
361
+
362
+ // ----------------------------------------------------------------------------
363
+
364
+ const newInstance = macro.newInstance(extend, 'vtkHDRReader');
365
+
366
+ // ----------------------------------------------------------------------------
367
+
368
+ var vtkHDRReader$1 = {
369
+ newInstance,
370
+ extend
371
+ };
372
+
373
+ export { vtkHDRReader$1 as default, extend, newInstance };
package/IO/Image.js ADDED
@@ -0,0 +1,7 @@
1
+ import vtkHDRReader from './Image/HDRReader.js';
2
+
3
+ var index = {
4
+ vtkHDRReader
5
+ };
6
+
7
+ export { index as default };
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
4
4
  import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
5
- import { r as radiansFromDegrees, A as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
+ import { r as radiansFromDegrees, C as degreesFromRadians } from '../../Common/Core/Math/index.js';
6
6
 
7
7
  // ----------------------------------------------------------------------------
8
8
  // vtkMouseCameraTrackballRollManipulator methods
@@ -8,7 +8,7 @@ import vtkSphereSource from '../../Filters/Sources/SphereSource.js';
8
8
  import { FieldAssociations } from '../../Common/DataModel/DataSet/Constants.js';
9
9
  import { mat4, vec3 } from 'gl-matrix';
10
10
  import { m as macro } from '../../macros2.js';
11
- import { B as areEquals, l as normalize, d as dot, C as clampValue, s as subtract, j as cross, w as multiplyScalar, e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
11
+ import { D as areEquals, l as normalize, d as dot, E as clampValue, s as subtract, j as cross, w as multiplyScalar, e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
12
12
 
13
13
  const {
14
14
  States
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkInteractorStyle from '../../Rendering/Core/InteractorStyle.js';
3
3
  import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
4
- import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
4
+ import { C as degreesFromRadians } from '../../Common/Core/Math/index.js';
5
5
  import { Device, Input } from '../../Rendering/Core/RenderWindowInteractor/Constants.js';
6
6
 
7
7
  const {
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { D as arrayRange } from '../../Common/Core/Math/index.js';
2
+ import { F as arrayRange } from '../../Common/Core/Math/index.js';
3
3
  import WebworkerPromise from 'webworker-promise';
4
4
  import { W as WorkerFactory } from '../../_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkMouseRangeManipulator from '../../Interaction/Manipulators/MouseRangeManipulator.js';
3
3
  import vtkViewProxy from './ViewProxy.js';
4
- import { j as cross, E as getMajorAxisIndex, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
4
+ import { j as cross, G as getMajorAxisIndex, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import { mat4, vec3 } from 'gl-matrix';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractMapper3D from './AbstractMapper3D.js';
3
- import { F as createUninitializedBounds } from '../../Common/Core/Math/index.js';
3
+ import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
4
 
5
5
  // ----------------------------------------------------------------------------
6
6
  // vtkAbstractImageMapper methods
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractMapper from './AbstractMapper.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { F as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
+ import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
5
 
6
6
  // ----------------------------------------------------------------------------
7
7
  // vtkAbstractMapper methods
@@ -1,4 +1,4 @@
1
- import { G as identity, H as multiplyMatrix } from '../../../Common/Core/Math/index.js';
1
+ import { I as identity, J as multiplyMatrix } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  /**
4
4
  * A helper file to transform RGBA points using CSS filters equivalent
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { h as hsv2rgb, i as isNan, I as floor, J as isInf, K as rgb2hsv, L as rgb2lab, M as lab2rgb } from '../../Common/Core/Math/index.js';
2
+ import { h as hsv2rgb, i as isNan, K as floor, L as isInf, M as rgb2hsv, N as rgb2lab, O as lab2rgb } from '../../Common/Core/Math/index.js';
3
3
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors.js';
4
4
  import Constants from './ColorTransferFunction/Constants.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import Constants from './Coordinate/Constants.js';
3
- import { N as round, I as floor } from '../../Common/Core/Math/index.js';
3
+ import { P as round, K as floor } from '../../Common/Core/Math/index.js';
4
4
 
5
5
  const {
6
6
  Coordinate
@@ -1,6 +1,6 @@
1
1
  import { vec3, mat4 } from 'gl-matrix';
2
2
  import * as d3 from 'd3-scale';
3
- import { O as normalize2D, P as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
3
+ import { Q as normalize2D, R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
4
4
  import { m as macro } from '../../macros2.js';
5
5
  import vtkActor from './Actor.js';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
@@ -2,7 +2,7 @@ import { mat4, vec3, mat3 } from 'gl-matrix';
2
2
  import Constants from './Glyph3DMapper/Constants.js';
3
3
  import { m as macro } from '../../macros2.js';
4
4
  import vtkMapper from './Mapper.js';
5
- import { F as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
5
+ import { H as createUninitializedBounds, n as norm } from '../../Common/Core/Math/index.js';
6
6
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
7
7
 
8
8
  const {
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkAbstractImageMapper from './AbstractImageMapper.js';
3
3
  import vtkImageMapper from './ImageMapper.js';
4
- import { F as createUninitializedBounds } from '../../Common/Core/Math/index.js';
4
+ import { H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
5
  import { intersectWithLineForPointPicking, intersectWithLineForCellPicking } from './AbstractImageMapper/helper.js';
6
6
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
7
7
 
@@ -2,7 +2,7 @@ import Constants from './ImageMapper/Constants.js';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkAbstractImageMapper from './AbstractImageMapper.js';
4
4
  import { intersectWithLineForPointPicking, intersectWithLineForCellPicking } from './AbstractImageMapper/helper.js';
5
- import { C as clampValue, Q as multiply3x3_vect3, F as createUninitializedBounds, R as getSparseOrthogonalMatrix } from '../../Common/Core/Math/index.js';
5
+ import { E as clampValue, S as multiply3x3_vect3, H as createUninitializedBounds, T as getSparseOrthogonalMatrix } from '../../Common/Core/Math/index.js';
6
6
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
7
7
 
8
8
  const {
@@ -3,7 +3,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
3
3
  import vtkDataArray from '../../Common/Core/DataArray.js';
4
4
  import vtkImageData from '../../Common/DataModel/ImageData.js';
5
5
  import vtkLookupTable from '../../Common/Core/LookupTable.js';
6
- import { F as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
6
+ import { H as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
7
7
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
8
8
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
9
9
  import Constants from './Mapper/Constants.js';
@@ -1,7 +1,7 @@
1
1
  import { mat4, quat } from 'gl-matrix';
2
2
  import { m as macro } from '../../macros2.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { A as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
4
+ import { C as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
5
5
  import vtkProp from './Prop.js';
6
6
 
7
7
  const VTK_EPSILON = 1e-6;
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { A as degreesFromRadians } from '../../Common/Core/Math/index.js';
2
+ import { C as degreesFromRadians } from '../../Common/Core/Math/index.js';
3
3
  import Constants from './RenderWindowInteractor/Constants.js';
4
4
 
5
5
  const {
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
2
2
  import { n as newInstance$1, g as get, e as setGet, k as getArray, l as setGetArray, i as moveToProtected, c as macro } from '../../macros2.js';
3
3
  import vtkCamera from './Camera.js';
4
4
  import vtkLight from './Light.js';
5
- import { S as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, F as createUninitializedBounds } from '../../Common/Core/Math/index.js';
5
+ import { U as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, H as createUninitializedBounds } from '../../Common/Core/Math/index.js';
6
6
  import vtkViewport from './Viewport.js';
7
7
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import * as d3 from 'd3-scale';
2
- import { P as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
2
+ import { R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
3
3
  import { m as macro } from '../../macros2.js';
4
4
  import vtkActor from './Actor.js';
5
5
  import vtkDataArray from '../../Common/Core/DataArray.js';
@@ -1,5 +1,5 @@
1
1
  import { m as macro } from '../../macros2.js';
2
- import { F as createUninitializedBounds, C as clampValue, I as floor } from '../../Common/Core/Math/index.js';
2
+ import { H as createUninitializedBounds, E as clampValue, K as floor } from '../../Common/Core/Math/index.js';
3
3
  import Constants from './VolumeMapper/Constants.js';
4
4
  import vtkAbstractMapper3D from './AbstractMapper3D.js';
5
5
  import vtkPiecewiseFunction from '../../Common/DataModel/PiecewiseFunction.js';
@@ -8,7 +8,7 @@ import { v as vtkPolyData2DVS } from './glsl/vtkPolyData2DVS.glsl.js';
8
8
  import vtkReplacementShaderMapper from './ReplacementShaderMapper.js';
9
9
  import vtkShaderProgram from './ShaderProgram.js';
10
10
  import vtkViewNode from '../SceneGraph/ViewNode.js';
11
- import { N as round } from '../../Common/Core/Math/index.js';
11
+ import { P as round } from '../../Common/Core/Math/index.js';
12
12
  import { DisplayLocation } from '../Core/Property2D/Constants.js';
13
13
  import { registerOverride } from './ViewNodeFactory.js';
14
14
 
@@ -2,7 +2,7 @@ import Constants from './Texture/Constants.js';
2
2
  import HalfFloat from '../../Common/Core/HalfFloat.js';
3
3
  import { n as newInstance$1, o as obj, s as set, e as setGet, g as get, i as moveToProtected, a as newTypedArray, c as macro } from '../../macros2.js';
4
4
  import vtkDataArray from '../../Common/Core/DataArray.js';
5
- import { T as isPowerOfTwo, P as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
5
+ import { V as isPowerOfTwo, R as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
6
6
  import vtkViewNode from '../SceneGraph/ViewNode.js';
7
7
  import { registerOverride } from './ViewNodeFactory.js';
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../macros2.js';
2
2
  import vtkActor from '../../Rendering/Core/Actor.js';
3
3
  import vtkMapper from '../../Rendering/Core/Mapper.js';
4
- import { B as areEquals } from '../../Common/Core/Math/index.js';
4
+ import { D as areEquals } from '../../Common/Core/Math/index.js';
5
5
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
6
6
  import vtkTubeFilter from '../../Filters/General/TubeFilter.js';
7
7
  import { getPixelWorldHeightAtCoord } from '../Core/WidgetManager.js';
@@ -3,7 +3,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
3
3
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
4
4
  import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
5
5
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
6
- import { s as subtract, U as angleBetweenVectors } from '../../Common/Core/Math/index.js';
6
+ import { s as subtract, W as angleBetweenVectors } from '../../Common/Core/Math/index.js';
7
7
  import widgetBehavior from './AngleWidget/behavior.js';
8
8
  import generateState from './AngleWidget/state.js';
9
9
  import { ViewTypes } from '../Core/WidgetManager/Constants.js';
@@ -1,4 +1,4 @@
1
- import { s as subtract, w as multiplyScalar, k as add, B as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { s as subtract, w as multiplyScalar, k as add, D as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  function calculateTextPosition(model) {
4
4
  const vector = [0, 0, 0];
@@ -1,7 +1,7 @@
1
1
  import { m as macro } from '../../../macros2.js';
2
2
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
3
3
  import vtkLine from '../../../Common/DataModel/Line.js';
4
- import { k as add, l as normalize, s as subtract, d as dot, j as cross, m as multiplyAccumulate, w as multiplyScalar, V as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
4
+ import { k as add, l as normalize, s as subtract, d as dot, j as cross, m as multiplyAccumulate, w as multiplyScalar, X as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
5
5
  import { getLineNames, getOtherLineName, updateState, boundPointOnPlane, getLinePlaneName, getLineInPlaneName, rotateVector } from './helpers.js';
6
6
  import { InteractionMethodsName, ScrollingMethods, planeNameToViewType } from './Constants.js';
7
7
 
@@ -2,7 +2,7 @@ import vtkBoundingBox, { STATIC } from '../../../Common/DataModel/BoundingBox.js
2
2
  import vtkCubeSource from '../../../Filters/Sources/CubeSource.js';
3
3
  import vtkCutter from '../../../Filters/Core/Cutter.js';
4
4
  import vtkPlane from '../../../Common/DataModel/Plane.js';
5
- import { s as subtract, l as normalize, j as cross, w as multiplyScalar, m as multiplyAccumulate, V as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
5
+ import { s as subtract, l as normalize, j as cross, w as multiplyScalar, m as multiplyAccumulate, X as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
6
  import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
7
7
  import { viewTypeToPlaneName, planeNameToViewType, planeNames } from './Constants.js';
8
8
 
package/index.d.ts CHANGED
@@ -96,6 +96,7 @@
96
96
  /// <reference path="./IO/Geometry/PLYWriter.d.ts" />
97
97
  /// <reference path="./IO/Geometry/STLReader.d.ts" />
98
98
  /// <reference path="./IO/Geometry/STLWriter.d.ts" />
99
+ /// <reference path="./IO/Image/HDRReader.d.ts" />
99
100
  /// <reference path="./IO/Misc/ElevationReader.d.ts" />
100
101
  /// <reference path="./IO/Misc/GCodeReader.d.ts" />
101
102
  /// <reference path="./IO/Misc/ITKImageReader.d.ts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "32.4.0",
3
+ "version": "32.5.0",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",