Hanging Protocol: Need to open all the series and multi-frame images together

Describe Your Question

  • I am able to view multiple series and multiframe images in different grids, but the series or the multiframe images are not being opened automatically in their respective grids.
  • OHIF Version: v3.9.0-beta.47.

What steps can we follow to reproduce the bug?

  • Configure the seriesView hanging protocol provided below in the application.
  • Load a study that contains multiple series or multiframe images.
  • Observe that the grids are displayed as per the seriesView hanging protocol layout (e.g., 4x4, 3x3, or 2x2 grids).
  • Note that the series or multiframe images are not automatically loaded into the grids.

Hanging Protocol

import { Types } from '@ohif/core';

const seriesView: Types.HangingProtocol.Protocol = {
  id: '@ohif/seriesView',
  description: 'Series view for the active series',
  name: 'SeriesView',
  icon: 'tool-series-stack',
  isPreset: true,
  toolGroupIds: ['default'],
  protocolMatchingRules: [], // Default protocol, matches all studies
  displaySetSelectors: {
    defaultDisplaySetId: {
      seriesMatchingRules: [
        {
          attribute: 'numImageFrames',
          constraint: { greaterThan: { value: 0 } }, // Match all series with at least 1 frame
          required: true,
        },
        {
          attribute: 'isDisplaySetFromUrl',
          weight: 10,
          constraint: { equals: true },
        },
      ],
    },
  },
  defaultViewport: {
    viewportOptions: {
      viewportType: 'stack',
      toolGroupId: 'default',
      allowUnmatchedView: true,
    },
    displaySets: [
      {
        id: 'defaultDisplaySetId',
        matchedDisplaySetsIndex: -1,
      },
    ],
  },
  stages: [
    {
      name: 'seriesView',
      id: '4x4',
      viewportStructure: {
        layoutType: 'grid',
        properties: {
          rows: 4,
          columns: 4,
        },
      },
      viewports: Array.from({ length: 16 }, (_, index) => ({
        viewportOptions: {
          toolGroupId: 'default',
          syncGroups: [
            { type: 'zoompan', id: 'zoompansync', source: true, target: true },
            {
              type: 'voi',
              id: 'wlsync',
              source: true,
              target: true,
              options: { syncColormap: true },
            },
          ],
        },
        displaySets: [
          {
            id: `displaySet_${index}`,
            matchedDisplaySetsIndex: index, // Match a unique series for each viewport
          },
        ],
      })),
    },
    {
      name: 'seriesView',
      id: '3x3',
      viewportStructure: {
        layoutType: 'grid',
        properties: {
          rows: 3,
          columns: 3,
        },
      },
      viewports: Array.from({ length: 9 }, (_, index) => ({
        viewportOptions: {
          toolGroupId: 'default',
          syncGroups: [
            { type: 'zoompan', id: 'zoompansync', source: true, target: true },
            {
              type: 'voi',
              id: 'wlsync',
              source: true,
              target: true,
              options: { syncColormap: true },
            },
          ],
        },
        displaySets: [
          {
            id: `displaySet_${index}`,
            matchedDisplaySetsIndex: index, // Match a unique series for each viewport
          },
        ],
      })),
    },
    {
      name: 'seriesView',
      id: '2x2',
      viewportStructure: {
        layoutType: 'grid',
        properties: {
          rows: 2,
          columns: 2,
        },
      },
      viewports: Array.from({ length: 4 }, (_, index) => ({
        viewportOptions: {
          toolGroupId: 'default',
          syncGroups: [
            { type: 'zoompan', id: 'zoompansync', source: true, target: true },
            {
              type: 'voi',
              id: 'wlsync',
              source: true,
              target: true,
              options: { syncColormap: true },
            },
          ],
        },
        displaySets: [
          {
            id: `displaySet_${index}`,
            matchedDisplaySetsIndex: index, // Match a unique series for each viewport
          },
        ],
      })),
    },
  ],
};

export { seriesView };

Can you please try on the latest OHIF 3.9

Or in the master branch (3.10-beta)

Yes, it worked on the stable version with few minor changes.
Thanks a lot.