|
1 | 1 | import { VolumeViewport, metaData, utilities } from '@cornerstonejs/core'; |
2 | 2 | import { IStackViewport, IVolumeViewport, Point3 } from '@cornerstonejs/core/dist/esm/types'; |
3 | 3 | import { AnnotationDisplayTool, drawing } from '@cornerstonejs/tools'; |
4 | | -import { guid } from '@ohif/core/src/utils'; |
| 4 | +import { guid, b64toBlob } from '@ohif/core/src/utils'; |
5 | 5 | import OverlayPlaneModuleProvider from './OverlayPlaneModuleProvider'; |
6 | 6 |
|
7 | 7 | interface CachedStat { |
@@ -46,7 +46,7 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { |
46 | 46 | super(toolProps, defaultToolProps); |
47 | 47 | } |
48 | 48 |
|
49 | | - onSetToolDisabled = (): void => { }; |
| 49 | + onSetToolDisabled = (): void => {}; |
50 | 50 |
|
51 | 51 | protected getReferencedImageId(viewport: IStackViewport | IVolumeViewport): string { |
52 | 52 | if (viewport instanceof VolumeViewport) { |
@@ -174,6 +174,10 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { |
174 | 174 | pixelData = overlay.pixelData[0]; |
175 | 175 | } else if (overlay.pixelData.retrieveBulkData) { |
176 | 176 | pixelData = await overlay.pixelData.retrieveBulkData(); |
| 177 | + } else if (overlay.pixelData.InlineBinary) { |
| 178 | + const blob = b64toBlob(overlay.pixelData.InlineBinary); |
| 179 | + const arrayBuffer = await blob.arrayBuffer(); |
| 180 | + pixelData = arrayBuffer; |
177 | 181 | } |
178 | 182 |
|
179 | 183 | if (!pixelData) { |
|
0 commit comments