* feat: Add state sync and use it to remember viewport grid info fix: Version updates Fixes for toggling MPR mode Fix the display when the interleaved load module fails Fix the memory of the state to restore correctly PR fixes for the state sync service PR fixes PR fixes PR fixes Added a hack warning to remove volumeDeactivate Fixes for TMTV colormap setting Fix the casing Missed renames fix: tests not running due to variance in ordering Reverting some fixes to change case PR changes - mostly comments and minor improvements fix: All display sets were being updated on drag and drop PR fixes - mostly renames PR fixes Test support for OHIF, for HP branch test: Add at least a minimal set of automated tests for hanging protocols Docs PR fixes Merge fixes DOCS updates Add an example of the mn hanging protocol PR fixes PR fixes PR fixes * Fix the drag and drop PR fixes * PR changes - update default keys for next/previous stage * fix: Was storing the custom viewport grid too aggressively Caused by a PR change misspelling a variable
65 lines
2.4 KiB
TypeScript
65 lines
2.4 KiB
TypeScript
import { Types } from '@ohif/core';
|
|
|
|
import { id } from './id';
|
|
|
|
import getHangingProtocolModule from './hp';
|
|
// import {setViewportZoomPan, storeViewportZoomPan } from './custom-viewport/setViewportZoomPan';
|
|
import sameAs from './custom-attribute/sameAs';
|
|
import numberOfDisplaySets from './custom-attribute/numberOfDisplaySets';
|
|
import numberOfDisplaySetsWithImages from './custom-attribute/numberOfDisplaySetsWithImages';
|
|
import maxNumImageFrames from './custom-attribute/maxNumImageFrames';
|
|
import seriesDescriptionsFromDisplaySets from './custom-attribute/seriesDescriptionsFromDisplaySets';
|
|
|
|
/**
|
|
* The test extension provides additional behaviour for testing various
|
|
* customizations and settings for OHIF.
|
|
*/
|
|
const testExtension: Types.Extensions.Extension = {
|
|
/**
|
|
* Only required property. Should be a unique value across all extensions.
|
|
*/
|
|
id,
|
|
|
|
/** Register additional behaviour:
|
|
* * HP custom attribute seriesDescriptions to retrieve an array of all series descriptions
|
|
* * HP custom attribute numberOfDisplaySets to retrieve the number of display sets
|
|
* * HP custom attribute numberOfDisplaySetsWithImages to retrieve the number of display sets containing images
|
|
* * HP custom attribute to return a boolean true, when the attribute sameAttribute has the same
|
|
* value as another series description in an already matched display set selector named with the value
|
|
* in `sameDisplaySetId`
|
|
*/
|
|
preRegistration: ({ servicesManager }: Types.Extensions.ExtensionParams) => {
|
|
const { hangingProtocolService } = servicesManager.services;
|
|
hangingProtocolService.addCustomAttribute(
|
|
'seriesDescriptions',
|
|
'Series Descriptions',
|
|
seriesDescriptionsFromDisplaySets
|
|
);
|
|
hangingProtocolService.addCustomAttribute(
|
|
'numberOfDisplaySets',
|
|
'Number of displays sets',
|
|
numberOfDisplaySets
|
|
);
|
|
hangingProtocolService.addCustomAttribute(
|
|
'numberOfDisplaySetsWithImages',
|
|
'Number of displays sets with images',
|
|
numberOfDisplaySetsWithImages
|
|
);
|
|
hangingProtocolService.addCustomAttribute(
|
|
'maxNumImageFrames',
|
|
'Maximum of number of image frames',
|
|
maxNumImageFrames
|
|
);
|
|
hangingProtocolService.addCustomAttribute(
|
|
'sameAs',
|
|
'Match an attribute in an existing display set',
|
|
sameAs
|
|
);
|
|
},
|
|
|
|
/** Registers some additional hanging protocols. See hp/index.tsx for more details */
|
|
getHangingProtocolModule,
|
|
};
|
|
|
|
export default testExtension;
|