feat(overlay): add inline binary overlays (#3852)
This commit is contained in:
1 parent
c4064acfbc
commit
0177b625ba
1 file changed
+5
-1
@@ -1,7 +1,7 @@
|
|||||||
import { VolumeViewport, metaData, utilities } from '@cornerstonejs/core';
|
import { VolumeViewport, metaData, utilities } from '@cornerstonejs/core';
|
||||||
import { IStackViewport, IVolumeViewport, Point3 } from '@cornerstonejs/core/dist/esm/types';
|
import { IStackViewport, IVolumeViewport, Point3 } from '@cornerstonejs/core/dist/esm/types';
|
||||||
import { AnnotationDisplayTool, drawing } from '@cornerstonejs/tools';
|
import { AnnotationDisplayTool, drawing } from '@cornerstonejs/tools';
|
||||||
import { guid } from '@ohif/core/src/utils';
|
import { guid, b64toBlob } from '@ohif/core/src/utils';
|
||||||
import OverlayPlaneModuleProvider from './OverlayPlaneModuleProvider';
|
import OverlayPlaneModuleProvider from './OverlayPlaneModuleProvider';
|
||||||
|
|
||||||
interface CachedStat {
|
interface CachedStat {
|
||||||
@@ -174,6 +174,10 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool {
|
|||||||
pixelData = overlay.pixelData[0];
|
pixelData = overlay.pixelData[0];
|
||||||
} else if (overlay.pixelData.retrieveBulkData) {
|
} else if (overlay.pixelData.retrieveBulkData) {
|
||||||
pixelData = await overlay.pixelData.retrieveBulkData();
|
pixelData = await overlay.pixelData.retrieveBulkData();
|
||||||
|
} else if (overlay.pixelData.InlineBinary) {
|
||||||
|
const blob = b64toBlob(overlay.pixelData.InlineBinary);
|
||||||
|
const arrayBuffer = await blob.arrayBuffer();
|
||||||
|
pixelData = arrayBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pixelData) {
|
if (!pixelData) {
|
||||||
|
|||||||
Reference in new issue
Block a user