Describe Your Question
I am having an issue with new viewports added using the Layout tool. My hanging protocol defines new viewports to be of type volume
, however any new viewport created with the Layout tool defaults to a stack
viewport. It seems like the isHangingProtocolLayout
parameter is always undefined when using the Layout tool (setViewportGridLayout
command), which defaults it to false
causing the wrong behaviour further down. I tried also adding it as a commandOptions
parameter for the Layout tool itself, but no success.
I am using v3.8.3, and I was not experiencing this on v3.7.0, so I am wondering if it’s a config issue on my side or a bug.
Any help is appreciated!
What steps can we follow to reproduce the bug?
- Set up hanging protocol that defines new layout viewports to be of type
volume
- Open a study with multiple series (MR)
- Load first series into the main viewport (automatic)
- Using the Layout tool, create a new viewport (2 cols, 1 row)
- Verify new viewport is of type
volume
- Drag second series into new viewport
- Second viewport is now a stack viewport instead of a volume viewport (due to
isHangingProtocolLayout
being false and thus the protocol is not used to fetch theviewportOptions
Hangin protocol:
const gridHangingProtocol: Types.HangingProtocol.Protocol = {
id: 'default',
description: '',
name: 'Grid',
protocolMatchingRules: [
{
id: 'ModalitiesInStudy',
weight: 100,
attribute: 'ModalitiesInStudy',
constraint: {
greaterThan: 0,
},
required: false,
},
],
toolGroupIds: ['default'],
displaySetSelectors: {
defaultDisplaySetId: {
seriesMatchingRules: [],
},
},
defaultViewport: {
viewportOptions: {
viewportType: 'volume',
toolGroupId: 'default',
orientation: 'AXIAL',
allowUnmatchedView: true,
},
displaySets: [
{
id: 'defaultDisplaySetId',
matchedDisplaySetsIndex: -1,
},
],
},
stages: [
{
name: 'default',
id: 'default',
stageActivation: {
enabled: {
minViewportsMatched: 1,
},
},
viewportStructure: {
layoutType: 'grid',
properties: {
rows: 1,
columns: 1,
},
},
viewports: [
{
viewportOptions: {
toolGroupId: 'default',
viewportType: 'volume',
orientation: 'AXIAL',
allowUnmatchedView: true,
},
displaySets: [
{
id: 'defaultDisplaySetId',
},
],
},
],
},
],
numberOfPriorsReferenced: -1,
};
Toolbar button
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
props: {
evaluate: 'evaluate.action',
commands: [
{
commandName: 'setViewportGridLayout',
commandOptions: {
isHangingProtocolLayout: true,
},
},
],
},
},