Skip to content

Commit

Permalink
fix(htj2k):Support htj2k in the streaming volume loader
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Nov 25, 2022
1 parent b80ea40 commit 0256dc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
decodeImageFrame,
getImageFrame,
external,
} from 'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js';
} from 'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min';

function getImageRetrievalPool() {
return external.cornerstone.imageRetrievalPoolManager;
Expand Down Expand Up @@ -129,6 +129,8 @@ function getTransferSyntaxForContentType(contentType: string): string {
'image/x-jls': '1.2.840.10008.1.2.4.80',
'image/jp2': '1.2.840.10008.1.2.4.90',
'image/jpx': '1.2.840.10008.1.2.4.92',
'image/jphc': '3.2.840.10008.1.2.4.96',
'image/jls': '1.2.840.10008.1.2.4.80',
};

if (params['transfer-syntax']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ class SegmentationRenderingEngine {
const segmentationDisplayToolInstance = toolGroup.getToolInstance(
SegmentationDisplayTool.toolName
) as SegmentationDisplayTool;
if (!segmentationDisplayToolInstance) {
console.warn('No segmentation tool found inside', toolGroupId);
return;
}

function onSegmentationRender(evt: Types.EventTypes.ImageRenderedEvent) {
const { element, viewportId, renderingEngineId } = evt.detail;
Expand Down

0 comments on commit 0256dc1

Please sign in to comment.