Question
We are trying to render KO modalities in OHIF 3.10, which is currently not supported out of the box. To achieve this, we created a custom extension for rendering KO modalities. For example, in a CT study, if 2 images are marked as KO images, the series chooser should display a KO series. When we click on the KO series, it should show only those 2 images that are marked as KO.
Currently, we tried implementing this by filtering out the 2 images from the actual displaySet and attempting to render them. However, it is not working as expected. It seems to be referring to the cached displaySet. We also tried deleting the cached displaySet and re-adding it, but we were unable to add it back.
We are unsure if our approach is correct. Has anyone tried something similar or has any suggestions on how to handle this?
OHIF Version
- OHIF Version: 3.10
What steps can we follow to reproduce the issue?
- Create a
CTstudy with 2 images marked asKO. - Implement a custom
SOPClassHandlerModuleandViewportModuleforKO. - Attempt to filter the
KOimages from thedisplaySetand render them. - Observe that the
KOseries does not render correctly.
Code Snippet
Here is the code snippet we are using to filter and render the KO images:
function _getDisplaySetsFromSeries(instances, servicesManager) {
const filteredInstances = instances.filter(instance => {
return instance.isReferencedByKeyObject; // Custom flag for KO references
});
filteredInstances.forEach(instance => {
const displaySet = new DicomKODisplaySet({
metadata: instance,
useInstanceMetadata: true,
displaySetInstanceUID: utils.guid(),
SOPInstanceUID: instance.SOPInstanceUID,
SeriesInstanceUID: instance.SeriesInstanceUID,
StudyInstanceUID: instance.StudyInstanceUID,
SOPClassUID: instance.SOPClassUID,
SeriesDescription: 'Key Object Selection',
servicesManager,
});
displaySet.Modality = 'KO';
displaySet.initialize();
displaySets.push(displaySet);
});
return displaySets;
}
What We Have Tried
- Filtering the
KOimages from thedisplaySet. - Deleting the cached
displaySetand re-adding it. - Creating a custom
SOPClassHandlerModuleandViewportModule.
What Is Not Working
- The
KOseries is not rendering correctly. - The
displaySetseems to refer to the cached version, and changes are not reflected.
Expected Behavior
- The series chooser should display a
KOseries. - Clicking on the
KOseries should render only the images marked asKO.
Any Suggestions?
Has anyone implemented something similar or has suggestions on how to handle this? Are we missing something in our approach? Any help would be appreciated!