OHIF with Cornerstone3D 2.0 (#4347)
This commit is contained in:
1 parent
8981a61b8c
commit
7ce7127d7c
803 files changed
+32760
-15893
No files matched your search
+24
-8
@@ -11,20 +11,19 @@ const { MetadataProvider } = classes;
|
||||
const ohif = {
|
||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
||||
measurements: '@ohif/extension-default.panelModule.measure',
|
||||
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
|
||||
};
|
||||
|
||||
const cs3d = {
|
||||
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
|
||||
segPanel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
|
||||
segPanel: '@ohif/extension-cornerstone.panelModule.panelSegmentationNoHeader',
|
||||
measurements: '@ohif/extension-cornerstone.panelModule.measurements',
|
||||
};
|
||||
|
||||
const tmtv = {
|
||||
hangingProtocol: '@ohif/extension-tmtv.hangingProtocolModule.ptCT',
|
||||
petSUV: '@ohif/extension-tmtv.panelModule.petSUV',
|
||||
toolbox: '@ohif/extension-tmtv.panelModule.tmtvBox',
|
||||
export: '@ohif/extension-tmtv.panelModule.tmtvExport',
|
||||
tmtv: '@ohif/extension-tmtv.panelModule.tmtv',
|
||||
};
|
||||
|
||||
const extensionDependencies = {
|
||||
@@ -104,13 +103,30 @@ function modeFactory({ modeConfiguration }) {
|
||||
|
||||
customizationService.addModeCustomizations([
|
||||
{
|
||||
id: 'segmentation.panel',
|
||||
segmentationPanelMode: 'expanded',
|
||||
addSegment: false,
|
||||
id: 'PanelSegmentation.tableMode',
|
||||
mode: 'expanded',
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.onSegmentationAdd',
|
||||
onSegmentationAdd: () => {
|
||||
commandsManager.run('createNewLabelmapFromPT');
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'PanelSegmentation.readableText',
|
||||
// remove following if you are not interested in that stats
|
||||
readableText: {
|
||||
lesionStats: 'Lesion Statistics',
|
||||
minValue: 'Minimum Value',
|
||||
maxValue: 'Maximum Value',
|
||||
meanValue: 'Mean Value',
|
||||
volume: 'Volume',
|
||||
suvPeak: 'SUV Peak',
|
||||
suvMax: 'Maximum SUV',
|
||||
suvMaxIJK: 'SUV Max IJK',
|
||||
lesionGlyoclysisStats: 'Lesion Glycolysis',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
// For the hanging protocol we need to decide on the window level
|
||||
@@ -200,7 +216,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
props: {
|
||||
leftPanels: [ohif.thumbnailList],
|
||||
leftPanelClosed: true,
|
||||
rightPanels: [[tmtv.toolbox, cs3d.segPanel, tmtv.export], tmtv.petSUV],
|
||||
rightPanels: [tmtv.tmtv, tmtv.petSUV],
|
||||
viewports: [
|
||||
{
|
||||
namespace: cs3d.viewport,
|
||||
|
||||
@@ -6,14 +6,7 @@ export const toolGroupIds = {
|
||||
default: 'default',
|
||||
};
|
||||
|
||||
function _initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
) {
|
||||
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
const tools = {
|
||||
active: [
|
||||
{
|
||||
@@ -28,7 +21,10 @@ function _initToolGroups(
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
{
|
||||
toolName: toolNames.StackScroll,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
},
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
@@ -127,7 +123,7 @@ function _initToolGroups(
|
||||
},
|
||||
},
|
||||
],
|
||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
||||
enabled: [],
|
||||
disabled: [
|
||||
{
|
||||
toolName: toolNames.Crosshairs,
|
||||
@@ -155,7 +151,8 @@ function _initToolGroups(
|
||||
const mipTools = {
|
||||
active: [
|
||||
{
|
||||
toolName: toolNames.VolumeRotateMouseWheel,
|
||||
toolName: toolNames.VolumeRotate,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Wheel }],
|
||||
configuration: {
|
||||
rotateIncrementDegrees: 5,
|
||||
},
|
||||
@@ -169,7 +166,6 @@ function _initToolGroups(
|
||||
},
|
||||
],
|
||||
enabled: [
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
{
|
||||
toolName: toolNames.OrientationMarker,
|
||||
configuration: {
|
||||
@@ -184,22 +180,8 @@ function _initToolGroups(
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
||||
}
|
||||
|
||||
function initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
) {
|
||||
_initToolGroups(
|
||||
toolNames,
|
||||
Enums,
|
||||
toolGroupService,
|
||||
commandsManager,
|
||||
modeLabelConfig,
|
||||
servicesManager
|
||||
);
|
||||
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
||||
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
|
||||
}
|
||||
|
||||
export default initToolGroups;
|
||||
@@ -7,6 +7,7 @@ export default function setFusionActiveVolume(
|
||||
displaySetService
|
||||
) {
|
||||
const matchDetails = matches.get('ptDisplaySet');
|
||||
const matchDetails2 = matches.get('ctDisplaySet');
|
||||
|
||||
if (!matchDetails) {
|
||||
return;
|
||||
@@ -32,10 +33,13 @@ export default function setFusionActiveVolume(
|
||||
|
||||
// Todo: this should not take into account the loader id
|
||||
const volumeId = `cornerstoneStreamingImageVolume:${displaySets[0].displaySetInstanceUID}`;
|
||||
const { SeriesInstanceUID: SeriesInstanceUID2 } = matchDetails2;
|
||||
const ctDisplaySets = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID2);
|
||||
const ctVolumeId = `cornerstoneStreamingImageVolume:${ctDisplaySets[0].displaySetInstanceUID}`;
|
||||
|
||||
const windowLevelConfig = {
|
||||
...wlToolConfig,
|
||||
volumeId,
|
||||
volumeId: ctVolumeId,
|
||||
};
|
||||
|
||||
const ellipticalROIConfig = {
|
||||
|
||||
Reference in new issue
Block a user