fix(hp): Display set should allow remembered updates (#4707)

This commit is contained in:
Bill Wallace 2025-01-20 09:06:28 -05:00 committed by GitHub
parent 544dc543d9
commit 464148ece6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 8 deletions

View File

@ -32,6 +32,7 @@ export const hpMN: Types.HangingProtocol.Protocol = {
toolGroupIds: ['default'],
displaySetSelectors: {
defaultDisplaySetId: {
allowUnmatchedView: true,
seriesMatchingRules: seriesWithImages,
},
},
@ -39,7 +40,6 @@ export const hpMN: Types.HangingProtocol.Protocol = {
viewportOptions: {
viewportType: 'stack',
toolGroupId: 'default',
allowUnmatchedView: true,
syncGroups: [HYDRATE_SEG_SYNC_GROUP],
},
displaySets: [

View File

@ -680,7 +680,7 @@ export default class HangingProtocolService extends PubSubService {
}
// If the viewport options says to allow any instance, then we can assume
// it just updates this viewport
// it just updates this viewport. This is deprecated and will be removed
if (protocolViewport.viewportOptions.allowUnmatchedView) {
return defaultReturn;
}
@ -692,7 +692,8 @@ export default class HangingProtocolService extends PubSubService {
protocolViewport.displaySets[0];
const displaySetSelector = protocol.displaySetSelectors[displaySetSelectorId];
if (!displaySetSelector) {
// The display set can allow any view
if (!displaySetSelector || displaySetSelector.allowUnmatchedView) {
return defaultReturn;
}
@ -1352,9 +1353,7 @@ export default class HangingProtocolService extends PubSubService {
// Use the display set provided instead
if (reuseDisplaySetUID) {
if (viewportOptions.allowUnmatchedView !== true) {
this.validateDisplaySetSelectMatch(viewportDisplaySet, id, reuseDisplaySetUID);
}
// This display set should have already been validated
const displaySetInfo: HangingProtocol.DisplaySetInfo = {
displaySetInstanceUID: reuseDisplaySetUID,
displaySetOptions,

View File

@ -134,6 +134,14 @@ export type ViewportStructure = {
*/
export type DisplaySetSelector = {
id?: string;
/**
* This can be set to true to allow unmatched views to replace a view showing this instance
* This is done at hte display set selector level to ensure that viewports sharing a display set
* don't get different values of allowUnmatchedView
*/
allowUnmatchedView?: boolean;
// The image matching rule (not currently implemented) selects which image to
// display initially, only for stack views.
imageMatchingRules?: MatchingRule[];
@ -179,8 +187,11 @@ export type ViewportOptions = {
initialImageOptions?: CustomOption<initialImageOptions>;
syncGroups?: CustomOption<SyncGroup>[];
customViewportProps?: Record<string, unknown>;
// Set to true to allow non-matching drag and drop or options provided
// from options.displaySetSelectorsMap
/**
* Set to true to allow non-matching drag and drop or options provided
* from options.displaySetSelectorsMap
* @deprecated Moving to display set selector
*/
allowUnmatchedView?: boolean;
};