Mode: Validity
Overview
There are two mechanism for checking the validity of a mode for a study.
isValidMode
: which is called on a selected study in the workList.- The basic mode exports an
isValidMode
function which selects validity based on the modalities in the study.
- The basic mode exports an
validTags
isValidMode
This hook can be used to define a function that return a boolean
which decided the
validity of the mode based on StudyInstanceUID
and modalities
that are in the study.
For instance, for pet-ct mode, both PT
and 'CT' modalities should be available inside the study.
import { isValidMode } from '@ohif/mode-basic';
function modeFactory() {
return {
id: '',
displayName: '',
// Select either `CT & PT | MR & PT`
modeModalities: [ ['CT', 'PT'], ['MR', 'PT'] ],
// Just re-use the existing function
isValidMode,
/*
...
*/
}
}