-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 Proper error handling for derived display sets (#1708)
* fix: 🐛 Proper error handling for derived display sets * Revert idc.js change
- Loading branch information
1 parent
9ea37a2
commit 5b20d8f
Showing
11 changed files
with
162 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
extensions/dicom-segmentation/src/OHIFDicomSegSopClassHandler.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
extensions/dicom-segmentation/src/getOHIFDicomSegSopClassHandler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { MODULE_TYPES, utils } from '@ohif/core'; | ||
import loadSegmentation from './loadSegmentation'; | ||
|
||
// TODO: Should probably use dcmjs for this | ||
const SOP_CLASS_UIDS = { | ||
DICOM_SEG: '1.2.840.10008.5.1.4.1.1.66.4', | ||
}; | ||
|
||
const sopClassUIDs = Object.values(SOP_CLASS_UIDS); | ||
|
||
export default function getSopClassHandlerModule({ servicesManager }) { | ||
// TODO: Handle the case where there is more than one SOP Class Handler for the | ||
// same SOP Class. | ||
return { | ||
id: 'OHIFDicomSegSopClassHandler', | ||
type: MODULE_TYPES.SOP_CLASS_HANDLER, | ||
sopClassUIDs, | ||
getDisplaySetFromSeries: function( | ||
series, | ||
study, | ||
dicomWebClient, | ||
authorizationHeaders | ||
) { | ||
const instance = series.getFirstInstance(); | ||
const metadata = instance.getData().metadata; | ||
|
||
const { | ||
SeriesDate, | ||
SeriesTime, | ||
SeriesDescription, | ||
FrameOfReferenceUID, | ||
SOPInstanceUID, | ||
SeriesInstanceUID, | ||
StudyInstanceUID, | ||
} = metadata; | ||
|
||
const segDisplaySet = { | ||
Modality: 'SEG', | ||
displaySetInstanceUID: utils.guid(), | ||
wadoRoot: study.getData().wadoRoot, | ||
wadoUri: instance.getData().wadouri, | ||
SOPInstanceUID, | ||
SeriesInstanceUID, | ||
StudyInstanceUID, | ||
FrameOfReferenceUID, | ||
authorizationHeaders, | ||
metadata, | ||
isDerived: true, | ||
referencedDisplaySetUID: null, // Assigned when loaded. | ||
labelmapIndex: null, // Assigned when loaded. | ||
isLoaded: false, | ||
SeriesDate, | ||
SeriesTime, | ||
SeriesDescription, | ||
}; | ||
|
||
segDisplaySet.load = function(referencedDisplaySet, studies) { | ||
return loadSegmentation(segDisplaySet, referencedDisplaySet, studies); | ||
}; | ||
|
||
return segDisplaySet; | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ | |
|
||
.sb-message { | ||
font-size: 14px; | ||
word-break: break-all; | ||
word-break: normal; | ||
} | ||
|
||
.sb-item { | ||
|
Oops, something went wrong.