feat(multimonitor): Add simple multi-monitor support to open another study(#4178)
This commit is contained in:
1 parent
a4a6de07f4
commit
07c628e689
49 files changed
+1476
-367
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export default displaySet => {
|
||||
const frameAnatomy =
|
||||
displaySet?.images?.[0]?.SharedFunctionalGroupsSequence?.[0]?.FrameAnatomySequence?.[0];
|
||||
if (!frameAnatomy) {
|
||||
return undefined;
|
||||
}
|
||||
const laterality = frameAnatomy?.FrameLaterality;
|
||||
return laterality;
|
||||
};
|
||||
@@ -0,0 +1,214 @@
|
||||
const priorStudyMatchingRules = [
|
||||
{
|
||||
// The priorInstance is a study counter that indicates what position this study is in
|
||||
// and the value comes from the options parameter.
|
||||
attribute: 'studyInstanceUIDsIndex',
|
||||
from: 'options',
|
||||
required: true,
|
||||
constraint: {
|
||||
equals: { value: 1 },
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const currentStudyMatchingRules = [
|
||||
{
|
||||
// The priorInstance is a study counter that indicates what position this study is in
|
||||
// and the value comes from the options parameter.
|
||||
attribute: 'studyInstanceUIDsIndex',
|
||||
from: 'options',
|
||||
required: true,
|
||||
constraint: {
|
||||
equals: { value: 0 },
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const LCCSeriesMatchingRules = [
|
||||
{
|
||||
weight: 10,
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
contains: 'SCT:399162004',
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 5,
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
contains: 'L',
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 20,
|
||||
attribute: 'SeriesDescription',
|
||||
constraint: {
|
||||
contains: 'L CC',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const RCCSeriesMatchingRules = [
|
||||
{
|
||||
weight: 10,
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
contains: 'SCT:399162004',
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 5,
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
equals: ['P', 'L'],
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
doesNotEqual: ['A', 'R'],
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
weight: 20,
|
||||
attribute: 'SeriesDescription',
|
||||
constraint: {
|
||||
contains: 'CC',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const LMLOSeriesMatchingRules = [
|
||||
{
|
||||
weight: 10,
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
contains: 'SCT:399368009',
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 0,
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
doesNotEqual: 'SCT:399162004',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
weight: 5,
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
equals: ['A', 'R'],
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 20,
|
||||
attribute: 'SeriesDescription',
|
||||
constraint: {
|
||||
contains: 'L MLO',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const RMLOSeriesMatchingRules = [
|
||||
{
|
||||
weight: 10,
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
contains: 'SCT:399368009',
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'ViewCode',
|
||||
constraint: {
|
||||
doesNotEqual: 'SCT:399162004',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
doesNotContain: ['P', 'FL'],
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
weight: 5,
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
equals: ['P', 'L'],
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 5,
|
||||
attribute: 'PatientOrientation',
|
||||
constraint: {
|
||||
equals: ['A', 'FR'],
|
||||
},
|
||||
},
|
||||
{
|
||||
weight: 20,
|
||||
attribute: 'SeriesDescription',
|
||||
constraint: {
|
||||
contains: 'R MLO',
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'SeriesDescription',
|
||||
required: true,
|
||||
constraint: {
|
||||
doesNotContain: 'CC',
|
||||
},
|
||||
},
|
||||
{
|
||||
attribute: 'SeriesDescription',
|
||||
required: true,
|
||||
constraint: {
|
||||
doesNotEqual: 'L MLO',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
const RCC = {
|
||||
seriesMatchingRules: RCCSeriesMatchingRules,
|
||||
studyMatchingRules: currentStudyMatchingRules,
|
||||
};
|
||||
|
||||
const RCCPrior = {
|
||||
seriesMatchingRules: RCCSeriesMatchingRules,
|
||||
studyMatchingRules: priorStudyMatchingRules,
|
||||
};
|
||||
|
||||
const LCC = {
|
||||
seriesMatchingRules: LCCSeriesMatchingRules,
|
||||
studyMatchingRules: currentStudyMatchingRules,
|
||||
};
|
||||
|
||||
const LCCPrior = {
|
||||
seriesMatchingRules: LCCSeriesMatchingRules,
|
||||
studyMatchingRules: priorStudyMatchingRules,
|
||||
};
|
||||
|
||||
const RMLO = {
|
||||
seriesMatchingRules: RMLOSeriesMatchingRules,
|
||||
studyMatchingRules: currentStudyMatchingRules,
|
||||
};
|
||||
|
||||
const RMLOPrior = {
|
||||
seriesMatchingRules: RMLOSeriesMatchingRules,
|
||||
studyMatchingRules: priorStudyMatchingRules,
|
||||
};
|
||||
|
||||
const LMLO = {
|
||||
seriesMatchingRules: LMLOSeriesMatchingRules,
|
||||
studyMatchingRules: currentStudyMatchingRules,
|
||||
};
|
||||
|
||||
const LMLOPrior = {
|
||||
seriesMatchingRules: LMLOSeriesMatchingRules,
|
||||
studyMatchingRules: priorStudyMatchingRules,
|
||||
};
|
||||
|
||||
export { RCC, LCC, RMLO, LMLO, RCCPrior, LCCPrior, RMLOPrior, LMLOPrior };
|
||||
@@ -0,0 +1,8 @@
|
||||
import viewCode from './viewCode';
|
||||
import laterality from './laterality';
|
||||
|
||||
export default function registerHangingProtocolAttributes({ servicesManager }) {
|
||||
const { hangingProtocolService } = servicesManager.services;
|
||||
hangingProtocolService.addCustomAttribute('ViewCode', 'View Code Designator:Value', viewCode);
|
||||
hangingProtocolService.addCustomAttribute('Laterality', 'Laterality of object', laterality);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Types } from '@ohif/core';
|
||||
|
||||
type MatchingRule = Types.HangingProtocol.MatchingRule;
|
||||
|
||||
export const seriesWithImages: MatchingRule[] = [
|
||||
{
|
||||
attribute: 'numImageFrames',
|
||||
constraint: {
|
||||
greaterThan: { value: 0 },
|
||||
},
|
||||
weight: 1,
|
||||
required: true,
|
||||
},
|
||||
// This display set will select the specified items by preference
|
||||
// It has no affect if nothing is specified in the URL.
|
||||
{
|
||||
attribute: 'isDisplaySetFromUrl',
|
||||
weight: 20,
|
||||
constraint: {
|
||||
equals: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Types } from '@ohif/core';
|
||||
|
||||
type MatchingRule = Types.HangingProtocol.MatchingRule;
|
||||
|
||||
export const studyWithImages: MatchingRule[] = [
|
||||
{
|
||||
id: 'OneOrMoreSeries',
|
||||
weight: 25,
|
||||
attribute: 'numberOfDisplaySetsWithImages',
|
||||
constraint: {
|
||||
greaterThan: 0,
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,11 @@
|
||||
export default displaySet => {
|
||||
const ViewCodeSequence = displaySet?.images[0]?.ViewCodeSequence[0];
|
||||
if (!ViewCodeSequence) {
|
||||
return undefined;
|
||||
}
|
||||
const { CodingSchemeDesignator, CodeValue } = ViewCodeSequence;
|
||||
if (!CodingSchemeDesignator || !CodeValue) {
|
||||
return undefined;
|
||||
}
|
||||
return `${CodingSchemeDesignator}:${CodeValue}`;
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
/** A default viewport options */
|
||||
export const viewportOptions = {
|
||||
toolGroupId: 'default',
|
||||
allowUnmatchedView: true,
|
||||
syncGroups: [
|
||||
{
|
||||
type: 'hydrateseg',
|
||||
id: 'sameFORId',
|
||||
source: true,
|
||||
target: true,
|
||||
options: {
|
||||
matchingRules: ['sameFOR'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const hydrateSegDefault = viewportOptions;
|
||||
Reference in new issue
Block a user