fix(vewport): Add missing blendmodes from cornerstonejs (#4055)
This commit is contained in:
parent
1b366c92ee
commit
3ec7e51216
@ -1,6 +1,8 @@
|
|||||||
import { Enums } from '@cornerstonejs/core';
|
import { Enums } from '@cornerstonejs/core';
|
||||||
|
|
||||||
const MIP = 'mip';
|
const MIP = 'mip';
|
||||||
|
const MINIP = 'minip';
|
||||||
|
const AVG = 'avg';
|
||||||
|
|
||||||
export default function getCornerstoneBlendMode(blendMode: string): Enums.BlendModes {
|
export default function getCornerstoneBlendMode(blendMode: string): Enums.BlendModes {
|
||||||
if (!blendMode) {
|
if (!blendMode) {
|
||||||
@ -11,5 +13,13 @@ export default function getCornerstoneBlendMode(blendMode: string): Enums.BlendM
|
|||||||
return Enums.BlendModes.MAXIMUM_INTENSITY_BLEND;
|
return Enums.BlendModes.MAXIMUM_INTENSITY_BLEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error();
|
if (blendMode.toLowerCase() === MINIP) {
|
||||||
|
return Enums.BlendModes.MINIMUM_INTENSITY_BLEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blendMode.toLowerCase() === AVG) {
|
||||||
|
return Enums.BlendModes.AVERAGE_INTENSITY_BLEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(`Unsupported blend mode: ${blendMode}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user