@cornerstonejs/core 1.13.1 → 1.13.3
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/dist/cjs/RenderingEngine/BaseVolumeViewport.d.ts +2 -1
- package/dist/cjs/RenderingEngine/BaseVolumeViewport.js +13 -1
- package/dist/cjs/RenderingEngine/BaseVolumeViewport.js.map +1 -1
- package/dist/cjs/types/ViewportProperties.d.ts +2 -1
- package/dist/esm/RenderingEngine/BaseVolumeViewport.d.ts +2 -1
- package/dist/esm/RenderingEngine/BaseVolumeViewport.js +13 -1
- package/dist/esm/RenderingEngine/BaseVolumeViewport.js.map +1 -1
- package/dist/esm/types/ViewportProperties.d.ts +2 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
- package/src/RenderingEngine/BaseVolumeViewport.ts +23 -0
- package/src/types/ViewportProperties.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/umd/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"type": "individual",
|
|
47
47
|
"url": "https://ohif.org/donate"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "c6b8f5db43f3ae2e397240bf7d0da0be7a4fd434"
|
|
50
50
|
}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
BlendModes,
|
|
14
14
|
Events,
|
|
15
|
+
InterpolationType,
|
|
15
16
|
OrientationAxis,
|
|
16
17
|
ViewportStatus,
|
|
17
18
|
VOILUTFunctionType,
|
|
@@ -367,6 +368,23 @@ abstract class BaseVolumeViewport extends Viewport implements IVolumeViewport {
|
|
|
367
368
|
return newRGBTransferFunction;
|
|
368
369
|
}
|
|
369
370
|
|
|
371
|
+
private setInterpolationType(
|
|
372
|
+
interpolationType: InterpolationType,
|
|
373
|
+
volumeId?: string
|
|
374
|
+
) {
|
|
375
|
+
const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
|
|
376
|
+
|
|
377
|
+
if (!applicableVolumeActorInfo) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const { volumeActor } = applicableVolumeActorInfo;
|
|
382
|
+
const volumeProperty = volumeActor.getProperty();
|
|
383
|
+
|
|
384
|
+
// @ts-ignore
|
|
385
|
+
volumeProperty.setInterpolationType(interpolationType);
|
|
386
|
+
}
|
|
387
|
+
|
|
370
388
|
/**
|
|
371
389
|
* Sets the properties for the volume viewport on the volume
|
|
372
390
|
* (if fusion, it sets it for the first volume in the fusion)
|
|
@@ -449,6 +467,7 @@ abstract class BaseVolumeViewport extends Viewport implements IVolumeViewport {
|
|
|
449
467
|
invert,
|
|
450
468
|
colormap,
|
|
451
469
|
preset,
|
|
470
|
+
interpolationType,
|
|
452
471
|
}: VolumeViewportProperties = {},
|
|
453
472
|
volumeId?: string,
|
|
454
473
|
suppressEvents = false
|
|
@@ -467,6 +486,10 @@ abstract class BaseVolumeViewport extends Viewport implements IVolumeViewport {
|
|
|
467
486
|
this.setVOI(voiRange, volumeId, suppressEvents);
|
|
468
487
|
}
|
|
469
488
|
|
|
489
|
+
if (typeof interpolationType !== 'undefined') {
|
|
490
|
+
this.setInterpolationType(interpolationType);
|
|
491
|
+
}
|
|
492
|
+
|
|
470
493
|
if (VOILUTFunction !== undefined) {
|
|
471
494
|
this.setVOILUTFunction(VOILUTFunction, volumeId, suppressEvents);
|
|
472
495
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VOILUTFunctionType } from '../enums';
|
|
1
|
+
import { InterpolationType, VOILUTFunctionType } from '../enums';
|
|
2
2
|
import { VOIRange } from './voi';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -11,6 +11,8 @@ type ViewportProperties = {
|
|
|
11
11
|
VOILUTFunction?: VOILUTFunctionType;
|
|
12
12
|
/** invert flag - whether the image is inverted */
|
|
13
13
|
invert?: boolean;
|
|
14
|
+
/** interpolation type */
|
|
15
|
+
interpolationType?: InterpolationType;
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
export type { ViewportProperties };
|