OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.37k stars 3.39k forks source link

[Feature Request] Enable the Sync (Image Slice Sync) function when the viewer starts #4534

Open lam0620 opened 2 days ago

lam0620 commented 2 days ago

What feature or change would you like to see made?

Doctors want to enable the Sync (Image Slice Sync) function when the viewer starts. Now We have to click the 'Image Slice Sync' from the toolbar to be enabled. Please add this function to make doctor operations faster

Why should we prioritize this feature?

Operate quickly. With MR, CT studies, this function is usually used.

sedghi commented 1 day ago

I think we have it, no?

add this to your toolbar

createButton({
          id: 'ImageSliceSync',
          icon: 'link',
          label: 'Image Slice Sync',
          tooltip: 'Enable position synchronization on stack viewports',
          commands: {
            commandName: 'toggleSynchronizer',
            commandOptions: {
              type: 'imageSlice',
            },
          },
          listeners: {
            [EVENTS.VIEWPORT_NEW_IMAGE_SET]: {
              commandName: 'toggleImageSliceSync',
              commandOptions: { toggledState: true },
            },
          },
          evaluate: [
            'evaluate.cornerstone.synchronizer',
            {
              name: 'evaluate.viewport.supported',
              unsupportedViewportTypes: ['video', 'volume3d'],
            },
          ],
        }),
lam0620 commented 22 hours ago

@sedghi Yes we already have it but it isn't enabled/activated automatically when going to the image viewer page.

Reproceduce: Test on the study: https://viewer-dev.ohif.org/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7310.5101.860473186348887719777907797922

  1. Select an MR study with multi-series
  2. Select the Basic Viewer button
  3. Choose a 2x2 layout from the toolbar
  4. Scroll on a series, other related series don't scroll either => Not work because the Sync is not enabled/activated yet
  5. From the More dropdown, click 'Image Slice Sync' to enable/active
  6. Scroll on a series, other related series scroll also => Works

I want step #4 work also. Could you add it?

I tried to add ‘ImageSliceSync’ to ‘enabled’ after ‘ReferenceLines’ at File: \modes\longitudinal\src\initToolGroups.js

but it doesn't work.

function initDefaultToolGroup(
   ...
  const tools = {
     ...
    enabled: [
      { toolName: toolNames.ImageOverlayViewer },
      { toolName: toolNames.ReferenceLines },
      { toolName: toolNames.ImageSliceSync  },
      {
        toolName: SRToolNames.SRSCOORD3DPoint,
      },