Scan the containing folder when a DICOMDIR is opened - #173
Open
loxK wants to merge 1 commit into
Open
Conversation
A DICOMDIR carries no image of its own: it indexes the content of the media through its Directory Record Sequence, and holds none of the study, series and instance UIDs generateDICOMJson() requires. Opening one therefore returned an empty study list and a blank viewer. Since the app registers the dcm extension as application/dicom, such a file shows the app icon and opens in the viewer like any image, so nothing tells users it cannot work. It is also the one file of a burned medical media that carries a readable name, the images around it usually having no extension at all, which keeps them out of the folder scan. Opening a DICOMDIR now scans its folder with the extensionless mode already used for folders and public shares, so the files it indexes are picked up.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a DICOMDIR returns an empty study list and a blank viewer.
A DICOMDIR holds no image of its own. It indexes the content of the media through its Directory Record Sequence
(0004,1220)and carries none of the study, series and instance UIDs thatgenerateDICOMJson()requires, so it is dropped atDisplayController.php:302:Nothing tells users this cannot work.
RegisterMimeTypemaps thedcmextension toapplication/dicom, so a DICOMDIR named*.dcmshows the app icon, opens in the viewer and gets the View button on a public share, exactly like an image would. It is also frequently the only file of a burned medical media carrying a readable name, the images around it having no extension at all, which keeps them out of the folder scan. That is the layout described in #108.Opening a DICOMDIR now turns on the extensionless scan already used for folders and for public shares, so the files it indexes are picked up. Detection reads
MediaStorageSOPClassUID (0002,0002)and compares it to1.2.840.10008.1.3.10, the Media Storage Directory Storage SOP class.Tested on Nextcloud 33, on an MR study of 343 instances laid out as
images/pat00000/st000000/se00000X/mr0000XX, sitting next to 343 JPEG previews and a PDF report which are both discarded byis_dicom()before any parsing.