@kitware/vtk.js 32.5.0 → 33.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BREAKING_CHANGES.md +3 -0
- package/Rendering/Core/Actor.d.ts +5 -20
- package/Rendering/Core/Actor.js +5 -68
- package/Rendering/Core/ImageSlice.d.ts +7 -23
- package/Rendering/Core/ImageSlice.js +9 -68
- package/Rendering/Core/Prop3D.d.ts +39 -2
- package/Rendering/Core/Prop3D.js +81 -2
- package/Rendering/Core/Volume.d.ts +5 -20
- package/Rendering/Core/Volume.js +2 -70
- package/Rendering/Core/VolumeMapper/Constants.d.ts +0 -7
- package/Rendering/Core/VolumeMapper/Constants.js +2 -8
- package/Rendering/Core/VolumeMapper.d.ts +16 -140
- package/Rendering/Core/VolumeMapper.js +17 -52
- package/Rendering/Core/VolumeProperty/Constants.d.ts +12 -3
- package/Rendering/Core/VolumeProperty/Constants.js +11 -4
- package/Rendering/Core/VolumeProperty.d.ts +120 -4
- package/Rendering/Core/VolumeProperty.js +49 -4
- package/Rendering/OpenGL/ImageCPRMapper.js +27 -19
- package/Rendering/OpenGL/ImageMapper.js +27 -27
- package/Rendering/OpenGL/ImageResliceMapper.js +267 -173
- package/Rendering/OpenGL/PolyDataMapper.js +1 -8
- package/Rendering/OpenGL/RenderWindow/resourceSharingHelper.d.ts +3 -3
- package/Rendering/OpenGL/RenderWindow/resourceSharingHelper.js +8 -5
- package/Rendering/OpenGL/VolumeMapper.js +710 -772
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/WebGPU/VolumePassFSQ.js +2 -2
- package/macros2.js +1 -1
- package/package.json +8 -3
|
@@ -2,7 +2,7 @@ import { mat3, mat4, vec3 } from 'gl-matrix';
|
|
|
2
2
|
import { n as newInstance$1, e as setGet, o as obj, c as macro } from '../../macros2.js';
|
|
3
3
|
import vtkHelper from './Helper.js';
|
|
4
4
|
import vtkMapper from '../Core/Mapper.js';
|
|
5
|
-
import { l as normalize
|
|
5
|
+
import { l as normalize } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkOpenGLTexture from './Texture.js';
|
|
7
7
|
import vtkProp from '../Core/Prop.js';
|
|
8
8
|
import vtkProperty from '../Core/Property.js';
|
|
@@ -941,13 +941,6 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
941
941
|
publicAPI.renderPieceDraw(ren, actor);
|
|
942
942
|
publicAPI.renderPieceFinish(ren, actor);
|
|
943
943
|
};
|
|
944
|
-
publicAPI.computeBounds = (ren, actor) => {
|
|
945
|
-
if (!publicAPI.getInput()) {
|
|
946
|
-
uninitializeBounds(model.bounds);
|
|
947
|
-
return;
|
|
948
|
-
}
|
|
949
|
-
model.bounds = publicAPI.getInput().getBounds();
|
|
950
|
-
};
|
|
951
944
|
publicAPI.updateBufferObjects = (ren, actor) => {
|
|
952
945
|
// Rebuild buffers if needed
|
|
953
946
|
if (publicAPI.getNeedToRebuildBufferObjects(ren, actor)) {
|
|
@@ -9,8 +9,8 @@ import { vtkObject } from '../../../interfaces';
|
|
|
9
9
|
* @param useIndependentComponents A boolean taken from the image or volume property, using getIndependentComponents()
|
|
10
10
|
* @param numberOfComponents Taken from the data array, using getNumberOfComponents()
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
|
|
12
|
+
export function getTransferFunctionsHash(
|
|
13
|
+
transferFunctions: (vtkObject | null | undefined)[],
|
|
14
14
|
useIndependentComponents: boolean,
|
|
15
15
|
numberOfComponents: number
|
|
16
16
|
): string;
|
|
@@ -27,7 +27,7 @@ export function getImageDataHash(
|
|
|
27
27
|
): string;
|
|
28
28
|
|
|
29
29
|
declare const defaultExport: {
|
|
30
|
-
|
|
30
|
+
getTransferFunctionsHash: typeof getTransferFunctionsHash;
|
|
31
31
|
getImageDataHash: typeof getImageDataHash;
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
// See typescript header for documentation
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function getTransferFunctionsHash(transferFunctions, useIndependentComponents, numberOfComponents) {
|
|
4
|
+
return transferFunctions.length > 0 ? `${transferFunctions.map(tf => tf?.getMTime() ?? 'x').join('/')}-${useIndependentComponents}-${numberOfComponents}` : '0';
|
|
5
5
|
}
|
|
6
6
|
function getImageDataHash(image, scalars) {
|
|
7
|
-
|
|
7
|
+
// Don't use the image data, as the scalars will define the texture
|
|
8
|
+
// If using the image data in the hash, it will cause issues when two image data
|
|
9
|
+
// using the same scalars are in the same mapper (for example the VolumeMapper)
|
|
10
|
+
return `${scalars.getMTime()}`;
|
|
8
11
|
}
|
|
9
12
|
var resourceSharingHelper = {
|
|
10
|
-
|
|
13
|
+
getTransferFunctionsHash,
|
|
11
14
|
getImageDataHash
|
|
12
15
|
};
|
|
13
16
|
|
|
14
|
-
export { resourceSharingHelper as default, getImageDataHash,
|
|
17
|
+
export { resourceSharingHelper as default, getImageDataHash, getTransferFunctionsHash };
|