Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lam0620 opened this issue Nov 20, 2024 · 2 comments

Comments

@lam0620
Copy link
Contributor

lam0620 commented Nov 20, 2024

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.

Copy link
Member

sedghi commented Nov 20, 2024

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
Copy link
Contributor Author

lam0620 commented Nov 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants