Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

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

Open lam0620 opened this issue 1 year ago • 4 comments

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.

lam0620 avatar Nov 20 '24 05:11 lam0620

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'],
            },
          ],
        }),

sedghi avatar Nov 20 '24 14:11 sedghi

@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,
      },

lam0620 avatar Nov 21 '24 08:11 lam0620

did you find a way?

arturojain avatar Apr 03 '25 15:04 arturojain

I'm also curious if you've found a way to get this to work.

snadbad avatar Apr 09 '25 01:04 snadbad