-
-
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.
feat(handler): Add handler for unsupported sopclassUIDs (#3601)
- Loading branch information
1 parent
de6976d
commit f845f87
Showing
16 changed files
with
183 additions
and
67 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
30 changes: 30 additions & 0 deletions
30
extensions/default/src/getDisplaySetsFromUnsupportedSeries.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,30 @@ | ||
import ImageSet from '@ohif/core/src/classes/ImageSet'; | ||
import { DisplaySetMessage, DisplaySetMessageList } from '@ohif/core'; | ||
/** | ||
* Default handler for a instance list with an unsupported sopClassUID | ||
*/ | ||
export default function getDisplaySetsFromUnsupportedSeries(instances) { | ||
const imageSet = new ImageSet(instances); | ||
const messages = new DisplaySetMessageList(); | ||
messages.addMessage(DisplaySetMessage.CODES.UNSUPPORTED_DISPLAYSET); | ||
const instance = instances[0]; | ||
|
||
imageSet.setAttributes({ | ||
displaySetInstanceUID: imageSet.uid, // create a local alias for the imageSet UID | ||
SeriesDate: instance.SeriesDate, | ||
SeriesTime: instance.SeriesTime, | ||
SeriesInstanceUID: instance.SeriesInstanceUID, | ||
StudyInstanceUID: instance.StudyInstanceUID, | ||
SeriesNumber: instance.SeriesNumber || 0, | ||
FrameRate: instance.FrameTime, | ||
SOPClassUID: instance.SOPClassUID, | ||
SeriesDescription: instance.SeriesDescription || '', | ||
Modality: instance.Modality, | ||
numImageFrames: instances.length, | ||
unsupported: true, | ||
SOPClassHandlerId: 'unsupported', | ||
isReconstructable: false, | ||
messages, | ||
}); | ||
return [imageSet]; | ||
} |
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
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
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
Oops, something went wrong.