feat: add support to scoord3d (#5016)
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
This commit is contained in:
1 parent
af40f06524
commit
735405a855
73 files changed
+1032
-993
No files matched your search
+12
-7
@@ -21,7 +21,16 @@ const TrackedMeasurementsContext = React.createContext();
|
||||
TrackedMeasurementsContext.displayName = 'TrackedMeasurementsContext';
|
||||
const useTrackedMeasurements = () => useContext(TrackedMeasurementsContext);
|
||||
|
||||
const SR_SOPCLASSHANDLERID = '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr';
|
||||
const SR_SOP_CLASS_HANDLER_ID =
|
||||
'@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr';
|
||||
const COMPREHENSIVE_3D_SR_SOP_CLASS_HANDLER_ID =
|
||||
'@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d';
|
||||
|
||||
const hasValidSOPClassHandlerId = displaySet => {
|
||||
return [SR_SOP_CLASS_HANDLER_ID, COMPREHENSIVE_3D_SR_SOP_CLASS_HANDLER_ID].includes(
|
||||
displaySet.SOPClassHandlerId
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -320,18 +329,14 @@ function TrackedMeasurementsContextProvider(
|
||||
// The issue here is that this handler in TrackedMeasurementsContext
|
||||
// ends up occurring before the Viewport is created, so the displaySet
|
||||
// is not loaded yet, and isRehydratable is undefined unless we call load().
|
||||
if (
|
||||
displaySet.SOPClassHandlerId === SR_SOPCLASSHANDLERID &&
|
||||
!displaySet.isLoaded &&
|
||||
displaySet.load
|
||||
) {
|
||||
if (hasValidSOPClassHandlerId(displaySet) && !displaySet.isLoaded && displaySet.load) {
|
||||
await displaySet.load();
|
||||
}
|
||||
|
||||
// Magic string
|
||||
// load function added by our sopClassHandler module
|
||||
if (
|
||||
displaySet.SOPClassHandlerId === SR_SOPCLASSHANDLERID &&
|
||||
hasValidSOPClassHandlerId(displaySet) &&
|
||||
displaySet.isRehydratable === true &&
|
||||
!displaySet.isHydrated
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user