All files / modes/preclinical-4d/src getWorkflowSettings.ts

85.71% Statements 6/7
100% Branches 0/0
0% Functions 0/1
85.71% Lines 6/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 11934x             34x         34x                     34x                             34x   34x                                                                                                                                                            
const dynamicVolume = {
  sopClassHandler:
    '@ohif/extension-cornerstone-dynamic-volume.sopClassHandlerModule.dynamic-volume',
  leftPanel: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-volume',
  segmentation: '@ohif/extension-cornerstone-dynamic-volume.panelModule.dynamic-segmentation',
};
 
const cornerstone = {
  segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentationNoHeader',
  activeViewportWindowLevel: '@ohif/extension-cornerstone.panelModule.activeViewportWindowLevel',
};
 
const defaultButtons = [
  {
    buttonSection: 'primary',
    buttons: ['MeasurementTools', 'Zoom', 'WindowLevel', 'Crosshairs', 'Pan'],
  },
  {
    buttonSection: 'measurementSection',
    buttons: ['Length', 'Bidirectional', 'ArrowAnnotate', 'EllipticalROI'],
  },
];
 
const ROIThresholdToolbox = [
  {
    buttonSection: 'dynamic-toolbox',
    buttons: ['SegmentationTools'],
  },
  {
    buttonSection: 'segmentationToolboxToolsSection',
    buttons: ['BrushTools', 'RectangleROIStartEndThreshold'],
  },
  {
    buttonSection: 'brushToolsSection',
    buttons: ['Brush', 'Eraser', 'Threshold'],
  },
];
 
const defaultLeftPanel = [[dynamicVolume.leftPanel, cornerstone.activeViewportWindowLevel]];
 
const defaultLayout = {
  panels: {
    left: defaultLeftPanel,
    right: [],
  },
};
 
function getWorkflowSettings({ servicesManager }) {
  return {
    steps: [
      {
        id: 'dataPreparation',
        name: 'Data Preparation',
        layout: {
          panels: {
            left: defaultLeftPanel,
          },
        },
        toolbarButtons: defaultButtons,
        hangingProtocol: {
          protocolId: 'default4D',
          stageId: 'dataPreparation',
        },
        info: 'In the Data Preparation step, you can visualize the dynamic PT volume data in three orthogonal views: axial, sagittal, and coronal. Use the left panel controls to adjust the visualization settings, such as playback speed, or navigate between different frames. This step allows you to assess the quality of the PT data and prepare for further analysis or registration with other modalities.',
      },
      {
        id: 'registration',
        name: 'Registration',
        layout: defaultLayout,
        toolbarButtons: defaultButtons,
        hangingProtocol: {
          protocolId: 'default4D',
          stageId: 'registration',
        },
        info: 'The Registration step provides a comprehensive view of the CT, PT, and fused CT-PT volume data in multiple orientations. The fusion viewports display the CT and PT volumes overlaid, allowing you to visually assess the alignment and registration between the two modalities. The individual CT and PT viewports are also available for side-by-side comparison. This step is crucial for ensuring proper registration before proceeding with further analysis or quantification.',
      },
      {
        id: 'roiQuantification',
        name: 'ROI Quantification',
        layout: {
          panels: {
            left: defaultLeftPanel,
            right: [[dynamicVolume.segmentation]],
          },
          options: {
            leftPanelClosed: false,
            rightPanelClosed: false,
          },
        },
        toolbarButtons: [...defaultButtons, ...ROIThresholdToolbox],
        hangingProtocol: {
          protocolId: 'default4D',
          stageId: 'roiQuantification',
        },
        info: 'The ROI quantification step allows you to define regions of interest (ROIs) with labelmap segmentations, on the fused CT-PT volume data using the labelmap tools. The left panel provides controls for adjusting the dynamic volume visualization, while the right panel offers tools for segmentation, editing, and exporting the ROI data. This step enables you to quantify the uptake or other measures within the defined ROIs for further analysis.',
      },
      {
        id: 'kineticAnalysis',
        name: 'Kinetic Analysis',
        layout: defaultLayout,
        toolbarButtons: defaultButtons,
        hangingProtocol: {
          protocolId: 'default4D',
          stageId: 'kineticAnalysis',
        },
        onEnter: [
          {
            commandName: 'updateSegmentationsChartDisplaySet',
            options: { servicesManager },
          },
        ],
        info: 'The Kinetic Analysis step provides a comprehensive view for visualizing and analyzing the dynamic data derived from the ROI segmentations. The fusion viewports display the combined CT-PT volume data, while a dedicated viewport shows a series chart representing the data over time. This step allows you to explore the temporal dynamics of the uptake or other kinetic measures within the defined regions of interest, enabling further quantitative analysis and modeling.',
      },
    ],
  };
}
 
export { getWorkflowSettings as default };