@cornerstonejs/core 1.63.3 → 1.63.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "1.63.3",
3
+ "version": "1.63.4",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -47,5 +47,5 @@
47
47
  "type": "individual",
48
48
  "url": "https://ohif.org/donate"
49
49
  },
50
- "gitHead": "027b911678b62776ca4407fe900a47e1f5045e14"
50
+ "gitHead": "752f9beba007fcbd70718545199246df03061ca2"
51
51
  }
@@ -62,6 +62,7 @@ import type { vtkSlabCamera as vtkSlabCameraType } from './vtkClasses/vtkSlabCam
62
62
  import vtkSlabCamera from './vtkClasses/vtkSlabCamera';
63
63
  import transformWorldToIndex from '../utilities/transformWorldToIndex';
64
64
  import { getTransferFunctionNodes } from '../utilities/transferFunctionUtils';
65
+ import { getColormap, getColormapNames } from '../utilities/colormap';
65
66
  /**
66
67
  * Abstract base class for volume viewports. VolumeViewports are used to render
67
68
  * 3D volumes from which various orientations can be viewed. Since VolumeViewports
@@ -859,9 +860,11 @@ abstract class BaseVolumeViewport extends Viewport implements IVolumeViewport {
859
860
  acc.push(node.x, node.r, node.g, node.b);
860
861
  return acc;
861
862
  }, []);
862
- const colormaps = vtkColorMaps.rgbPresetNames.map((presetName) =>
863
+ const colormapsVTK = vtkColorMaps.rgbPresetNames.map((presetName) =>
863
864
  vtkColorMaps.getPresetByName(presetName)
864
865
  );
866
+ const colormapsCS3D = getColormapNames().map((colormapName) => getColormap(colormapName));
867
+ const colormaps = colormapsVTK.concat(colormapsCS3D);
865
868
  const matchedColormap = colormaps.find((colormap) => {
866
869
  const { RGBPoints: presetRGBPoints } = colormap;
867
870
  if (presetRGBPoints.length !== RGBPoints.length) {