@kitware/vtk.js 33.0.0-beta.4 → 33.0.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/BREAKING_CHANGES.md +0 -3
- package/Common/Core/ScalarsToColors/Constants.js +7 -2
- package/Common/Core/ScalarsToColors.js +3 -1
- package/Rendering/Core/Actor.d.ts +20 -5
- package/Rendering/Core/Actor.js +68 -5
- package/Rendering/Core/ColorTransferFunction.js +26 -35
- package/Rendering/Core/ImageCPRMapper.d.ts +20 -1
- package/Rendering/Core/ImageCPRMapper.js +2 -1
- package/Rendering/Core/ImageProperty.d.ts +1 -20
- package/Rendering/Core/ImageProperty.js +5 -7
- package/Rendering/Core/ImageResliceMapper.d.ts +20 -1
- package/Rendering/Core/ImageResliceMapper.js +2 -1
- package/Rendering/Core/ImageSlice.d.ts +23 -7
- package/Rendering/Core/ImageSlice.js +68 -9
- package/Rendering/Core/Mapper.js +8 -16
- package/Rendering/Core/Prop3D.d.ts +2 -39
- package/Rendering/Core/Prop3D.js +2 -81
- package/Rendering/Core/ScalarBarActor.js +4 -2
- package/Rendering/Core/Volume.d.ts +20 -5
- package/Rendering/Core/Volume.js +70 -2
- package/Rendering/Core/VolumeMapper/Constants.d.ts +7 -0
- package/Rendering/Core/VolumeMapper/Constants.js +8 -2
- package/Rendering/Core/VolumeMapper.d.ts +173 -16
- package/Rendering/Core/VolumeMapper.js +51 -16
- package/Rendering/Core/VolumeProperty/Constants.d.ts +3 -12
- package/Rendering/Core/VolumeProperty/Constants.js +4 -11
- package/Rendering/Core/VolumeProperty.d.ts +5 -140
- package/Rendering/Core/VolumeProperty.js +7 -54
- package/Rendering/OpenGL/ImageCPRMapper.js +21 -30
- package/Rendering/OpenGL/ImageMapper.js +27 -27
- package/Rendering/OpenGL/ImageResliceMapper.js +183 -271
- package/Rendering/OpenGL/PolyDataMapper.js +8 -1
- package/Rendering/OpenGL/RenderWindow/resourceSharingHelper.d.ts +3 -3
- package/Rendering/OpenGL/RenderWindow/resourceSharingHelper.js +5 -8
- package/Rendering/OpenGL/VolumeMapper.js +784 -722
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/WebGPU/VolumePassFSQ.js +2 -2
- package/index.d.ts +0 -1
- package/macros2.js +1 -1
- package/package.json +1 -1
- package/Interaction/Manipulators/KeyboardCameraManipulator.d.ts +0 -113
|
@@ -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 } from '../../Common/Core/Math/index.js';
|
|
5
|
+
import { l as normalize, u as uninitializeBounds } 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,6 +941,13 @@ 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
|
+
};
|
|
944
951
|
publicAPI.updateBufferObjects = (ren, actor) => {
|
|
945
952
|
// Rebuild buffers if needed
|
|
946
953
|
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 getTransferFunctionHash(
|
|
13
|
+
transferFunction: vtkObject | 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
|
+
getTransferFunctionHash: typeof getTransferFunctionHash;
|
|
31
31
|
getImageDataHash: typeof getImageDataHash;
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
// See typescript header for documentation
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function getTransferFunctionHash(transferFunction, useIndependentComponents, numberOfComponents) {
|
|
4
|
+
return transferFunction ? `${transferFunction.getMTime()}-${useIndependentComponents}-${numberOfComponents}` : '0';
|
|
5
5
|
}
|
|
6
6
|
function getImageDataHash(image, scalars) {
|
|
7
|
-
|
|
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()}`;
|
|
7
|
+
return `${image.getMTime()}A${scalars.getMTime()}`;
|
|
11
8
|
}
|
|
12
9
|
var resourceSharingHelper = {
|
|
13
|
-
|
|
10
|
+
getTransferFunctionHash,
|
|
14
11
|
getImageDataHash
|
|
15
12
|
};
|
|
16
13
|
|
|
17
|
-
export { resourceSharingHelper as default, getImageDataHash,
|
|
14
|
+
export { resourceSharingHelper as default, getImageDataHash, getTransferFunctionHash };
|