@kitware/vtk.js 25.15.0 → 25.15.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.
@@ -560,6 +560,7 @@ function vtkOpenGLImageMapper(publicAPI, model) {
560
560
  model.pwfTexture.setMagnificationFilter(Filter.LINEAR);
561
561
  }
562
562
 
563
+ var dataType = imgScalars.getDataType();
563
564
  var numComp = imgScalars.getNumberOfComponents();
564
565
  var iComps = actorProperty.getIndependentComponents();
565
566
  var numIComps = iComps ? numComp : 1;
@@ -694,7 +695,7 @@ function vtkOpenGLImageMapper(publicAPI, model) {
694
695
  var dims = image.getDimensions();
695
696
 
696
697
  if (iType === InterpolationType.NEAREST) {
697
- if (numComp === 4) {
698
+ if (new Set([1, 3, 4]).has(numComp) && dataType === VtkDataTypes.UNSIGNED_CHAR && !iComps) {
698
699
  model.openGLTexture.setGenerateMipmap(true);
699
700
  model.openGLTexture.setMinificationFilter(Filter.NEAREST);
700
701
  } else {
@@ -703,7 +704,7 @@ function vtkOpenGLImageMapper(publicAPI, model) {
703
704
 
704
705
  model.openGLTexture.setMagnificationFilter(Filter.NEAREST);
705
706
  } else {
706
- if (numComp === 4) {
707
+ if (numComp === 4 && dataType === VtkDataTypes.UNSIGNED_CHAR && !iComps) {
707
708
  model.openGLTexture.setGenerateMipmap(true);
708
709
  model.openGLTexture.setMinificationFilter(Filter.LINEAR_MIPMAP_LINEAR);
709
710
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "25.15.0",
3
+ "version": "25.15.1",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",