-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting the paths to the original DICOM files #353
Comments
You may want to fork the project and try several solutions yourself. I think a generalized solution that will work with huge multi band datasets, enhanced DICOM, etc. might get unwieldy as a generic solution. It might be something best suited to a forked adaptation for your dataset. A simple local modification would be to just have the function Another simple option would be to simply rename your DICOMs into a nice file naming structure that is easy to parse. For example, if you have well behaved DICOMs where the instance number corresponds to the slice position, you could rename your images by time, series/protocol, and instance number:
|
Thank you, Do you have an example where having My dataset has weird and special cases unfortunately, I cannot trust the instance numbers. I am also trying to see how else to parse SEG and RTSTRUCT formats, for now I do not see any other solution than knowing which slice in the NIfTI corresponds to which DICOM file or SOPInstanceUID |
Please see the latest developmental commit. Defining A minimal compile would be
When you run this variant, you get a listing of the file order, indexed from 0:
|
Thank you for the feature ! On an example of 4 slices, the output of dcm2niix is:
But the correct order (see the link for the test) is:
In the output, it adds a slice that is elsewhere in the scan in first position ( EDIT: Sorry if this is not the right place to mention this, should it be a separate issue ? |
Perfect, thanks ! |
I am converting DICOM files into NIfTI that have annotations (rtstruct, SEG formats).
In the annotation file, I got the path to the DICOM slice and must find the corresponding slice in the NIfTI scan. Some metadata from the slice is also required, like ImagePositionPatient.
As is, I can parse the verbose to try and get the paths to the slices but it does not work if there are several scans and the paths are not ordered.
Could you add a feature to get the ordered list of paths to the slices in the json after conversion ?
The text was updated successfully, but these errors were encountered: