fix: hanging protocol for the tmtv (#2882)

This commit is contained in:
Alireza 2022-08-19 19:35:29 -04:00 committed by GitHub
parent df6ddf1572
commit 2639d90e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 19 deletions

View File

@ -24,8 +24,11 @@ const DEFAULT_MEATADATA = {
*/
export default function PanelPetSUV({ servicesManager, commandsManager }) {
const { t } = useTranslation('PanelSUV');
const { DisplaySetService, ToolGroupService, ToolBarService } =
servicesManager.services;
const {
DisplaySetService,
ToolGroupService,
ToolBarService,
} = servicesManager.services;
const [metadata, setMetadata] = useState(DEFAULT_MEATADATA);
const [ptDisplaySet, setPtDisplaySet] = useState(null);
@ -210,7 +213,7 @@ export default function PanelPetSUV({ servicesManager, commandsManager }) {
}}
/>
<Input
label={t('Injection Time (Seconds)')}
label={t('Injection Time (s)')}
labelClassName="text-white"
className="mt-1 mb-2 bg-black border-primary-main"
type="text"
@ -228,7 +231,7 @@ export default function PanelPetSUV({ servicesManager, commandsManager }) {
}}
/>
<Input
label={t('Acquisition Time (Seconds)')}
label={t('Acquisition Time (s)')}
labelClassName="text-white"
className="mt-1 mb-2 bg-black border-primary-main"
type="text"

View File

@ -1,5 +1,5 @@
const ptCT = {
id: 'test',
id: 'tmtv-pt-ct',
locked: true,
hasUpdatedPriorsInformation: false,
name: 'Default',
@ -15,17 +15,6 @@ const ptCT = {
],
imageLoadStrategy: 'interleaveTopToBottom', // "default" , "interleaveTopToBottom", "interleaveCenter"
protocolMatchingRules: [
{
id: 'wauZK2QNEfDPwcAQo',
weight: 1,
attribute: 'StudyInstanceUID',
constraint: {
contains: {
value: '1.3.6.1.4.',
},
},
required: false,
},
{
id: 'wauZK2QNEfDPwcAQo',
weight: 1,

View File

@ -186,7 +186,7 @@ function modeFactory({ modeConfiguration }) {
},
],
extensions: extensionDependencies,
hangingProtocols: [ohif.hangingProtocols, tmtv.hangingProtocols],
hangingProtocols: [tmtv.hangingProtocols],
sopClassHandlers: [ohif.sopClassHandler],
hotkeys: [...hotkeys.defaults.hotkeyBindings],
};

View File

@ -116,12 +116,15 @@ export default class ProtocolEngine {
}
});
// If no matches were found, select the default protocol
// If no matches were found, select the default protocol if provided
// if not select the first protocol in the list
if (!matched.length) {
return [
{
score: 1,
protocol: this.protocols.find(protocol => protocol.id === 'default'),
protocol:
this.protocols.find(protocol => protocol.id === 'default') ??
this.protocols[0],
},
];
}