Skip to content

Commit

Permalink
reduce the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Oct 10, 2023
1 parent ec9bacc commit 0db98c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 77 deletions.
11 changes: 3 additions & 8 deletions extensions/default/src/getHangingProtocolModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const defaultProtocol = {
// additional viewports are added using the layout tool
defaultViewport: {
viewportOptions: {
viewportType: 'volume',
viewportType: 'stack',
toolGroupId: 'default',
allowUnmatchedView: true,
},
Expand All @@ -45,12 +45,6 @@ const defaultProtocol = {
greaterThan: { value: 0 },
},
},
{
attribute: 'Modality',
constraint: {
equals: 'CT',
},
},
// This display set will select the specified items by preference
// It has no affect if nothing is specified in the URL.
{
Expand Down Expand Up @@ -78,7 +72,8 @@ const defaultProtocol = {
viewports: [
{
viewportOptions: {
viewportType: 'volume',
viewportType: 'stack',
viewportId: 'default',
toolGroupId: 'default',
// This will specify the initial image options index if it matches in the URL
// and will otherwise not specify anything.
Expand Down
Binary file removed platform/app/public/pred.nrrd
Binary file not shown.
81 changes: 12 additions & 69 deletions platform/cli/templates/mode/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,21 @@ const ohif = {
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
thumbnailListTracking: '@ohif/extension-measurement-tracking.panelModule.seriesList',
viewport: '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked',
measurements: '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
measurementNoTracking: '@ohif/extension-default.panelModule.measure',
leftPanel: '@ohif/extension-default.panelModule.seriesList',
rightPanel: '@ohif/extension-default.panelModule.measure',
};

const dicomsr = {
sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr',
};

const dicomvideo = {
sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video',
};

const dicompdf = {
sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',
viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf',
};

const dicomSeg = {
sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
};

const dicomRT = {
viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt',
const cornerstone = {
viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',
};

/**
* Just two dependencies to be able to render a viewport with panels in order
* to make sure that the mode is working.
*/
const extensionDependencies = {
// Can derive the versions at least process.env.from npm_package_version
'@ohif/extension-default': '^3.0.0',
'@ohif/extension-cornerstone': '^3.0.0',
'@ohif/extension-measurement-tracking': '^3.0.0',
'@ohif/extension-cornerstone-dicom-sr': '^3.0.0',
'@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
'@ohif/extension-cornerstone-dicom-rt': '^3.0.0',
'@ohif/extension-dicom-pdf': '^3.0.1',
'@ohif/extension-dicom-video': '^3.0.1',
};

function modeFactory({ modeConfiguration }) {
Expand Down Expand Up @@ -162,35 +134,13 @@ function modeFactory({ modeConfiguration }) {
return {
id: ohif.layout,
props: {
leftPanels: [ohif.thumbnailList],
rightPanels: [ohif.measurementNoTracking],
// NOTE: You probably don't need all the following viewports to support
// pick the ones you need and remove the rest
leftPanels: [ohif.leftPanel],
rightPanels: [ohif.rightPanel],
viewports: [
{
namespace: ohif.viewport,
namespace: cornerstone.viewport,
displaySetsToDisplay: [ohif.sopClassHandler],
},
{
namespace: dicomsr.viewport,
displaySetsToDisplay: [dicomsr.sopClassHandler],
},
{
namespace: dicomvideo.viewport,
displaySetsToDisplay: [dicomvideo.sopClassHandler],
},
{
namespace: dicompdf.viewport,
displaySetsToDisplay: [dicompdf.sopClassHandler],
},
{
namespace: dicomSeg.viewport,
displaySetsToDisplay: [dicomSeg.sopClassHandler],
},
{
namespace: dicomRT.viewport,
displaySetsToDisplay: [dicomRT.sopClassHandler],
},
],
},
};
Expand All @@ -202,14 +152,7 @@ function modeFactory({ modeConfiguration }) {
/** HangingProtocol used by the mode */
// hangingProtocol: [''],
/** SopClassHandlers used by the mode */
sopClassHandlers: [
dicomvideo.sopClassHandler,
dicomSeg.sopClassHandler,
ohif.sopClassHandler,
dicompdf.sopClassHandler,
dicomsr.sopClassHandler,
dicomRT.sopClassHandler,
],
sopClassHandlers: [ohif.sopClassHandler],
/** hotkeys for mode */
hotkeys: [...hotkeys.defaults.hotkeyBindings],
};
Expand Down

0 comments on commit 0db98c3

Please sign in to comment.