feat: Add inherit from basic/longitudinal modes (#5435)
Co-authored-by: Ibrahim <ibrahim.mdev@gmail.com>
This commit is contained in:
1 parent
71d21ee184
commit
9ad0d7fc8c
28 files changed
+1153
-743
No files matched your search
@@ -71,6 +71,9 @@
|
||||
{
|
||||
"packageName": "@ohif/mode-longitudinal"
|
||||
},
|
||||
{
|
||||
"packageName": "@ohif/mode-basic"
|
||||
},
|
||||
{
|
||||
"packageName": "@ohif/mode-segmentation"
|
||||
},
|
||||
|
||||
@@ -27,6 +27,16 @@ window.config = {
|
||||
// Uses the ohif datasource as the default - this requires that KHEOPS be
|
||||
// configured with an OHIF path to .../viewer/dicomwebproxy
|
||||
defaultDataSourceName: 'ohif',
|
||||
// Show basic as 'Basic' and hide the longiutdinal mode for kheops
|
||||
modesConfiguration: {
|
||||
'@ohif/mode-basic': {
|
||||
hide: { $set: false },
|
||||
displayName: { $set: 'Basic' },
|
||||
},
|
||||
'@ohif/mode-longitudinal': {
|
||||
hide: { $set: true },
|
||||
},
|
||||
},
|
||||
/* Dynamic config allows user to pass "configUrl" query string this allows to load config without recompiling application. The regex will ensure valid configuration source */
|
||||
// dangerouslyUseDynamicConfig: {
|
||||
// enabled: true,
|
||||
|
||||
@@ -391,12 +391,21 @@ function WorkList({
|
||||
})
|
||||
: appConfig.loadedModes
|
||||
).map((mode, i) => {
|
||||
if (mode.hide) {
|
||||
// Hide this mode from display
|
||||
return null;
|
||||
}
|
||||
const modalitiesToCheck = modalities.replaceAll('/', '\\');
|
||||
|
||||
const { valid: isValidMode, description: invalidModeDescription } = mode.isValidMode({
|
||||
modalities: modalitiesToCheck,
|
||||
study,
|
||||
});
|
||||
if (isValidMode === null) {
|
||||
// Hide this as a computed result.
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO: Modes need a default/target route? We mostly support a single one for now.
|
||||
// We should also be using the route path, but currently are not
|
||||
// mode.routeName
|
||||
@@ -428,7 +437,7 @@ function WorkList({
|
||||
{/* TODO revisit the completely rounded style of buttons used for launching a mode from the worklist later */}
|
||||
<Button
|
||||
type={ButtonEnums.type.primary}
|
||||
size={ButtonEnums.size.medium}
|
||||
size={ButtonEnums.size.smallTall}
|
||||
disabled={!isValidMode}
|
||||
startIconTooltip={
|
||||
!isValidMode ? (
|
||||
@@ -446,7 +455,7 @@ function WorkList({
|
||||
}
|
||||
onClick={() => {}}
|
||||
dataCY={`mode-${mode.routeName}-${studyInstanceUid}`}
|
||||
className={isValidMode ? 'text-[13px]' : 'bg-[#222d44] text-[13px]'}
|
||||
className={!isValidMode && 'bg-[#222d44]'}
|
||||
>
|
||||
{mode.displayName}
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user