-
Notifications
You must be signed in to change notification settings - Fork 228
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
Feature suggestion: support DICOM file list as input for conversion #252
Comments
My suggestion would be to use the same mechanism that MRIcroGL and FSLeyes use to allow the user to select a specific series to load. The screenshot below shows the graphical interface of the latest MRIcroGL when a user drops a DICOM folder onto the executable. A dialog opens up displaying the series available in the selected folder, allowing the user to choose which one they want to load.
|
Interesting, thank you for those suggestions! What if I have multiple series that have the same SeriesNumber in the same folder? |
Looking at that file, it seems that it takes input as pointers to directories, not files. Am I mistaken? |
The example below shows two common cases of multiple-instances of the same series number:
Note as well that when you run dcm2niix in reporting mode (
When you run dcm2niix with the
I agree, the current implementation of dcm2niixbatch would require you to segment your data, but it does illustrate flexibility if you wanted to make a fork or pull request with more sophisticated file handling. There is certainly room to improve the |
Chris, as I tried to explain in the initial issue, in our situation one cannot assume anything about how DICOM files are organized in folders. It is a completely valid situation if one folder contains multiple patients and multiple studies. Furthermore, it is also limiting that
What I suggested is not to change functionality of any of the existing options, but to add a new option that would allow to specify a text or JSON file, which would contain flat list of input DICOM files that should be used for conversion. Otherwise, the only option to use |
Why don't you look at my latest commit on the development branch. It includes a new function A sample text file might look like this:
Only the specified images are converted - other images in the folders are ignored. All the images are converted as a single NIfTI file. The software should automatically order the slices, series, etc correctly. There are a couple caveats:
|
As a separate comment, is there an easy way to determine how to organize the DCE images together if they use separate series numbers? What mechanism does slicer use to concatenate these files? Can you share an example? If there is a clear method, one should be able update dcm2niix to automatically detect and combine these images for the user. |
@fedorov could you test the latest commit on the development branch. It should stack a DCE sequence from a single session as a single volume even if the series number varies. The output order will match the series number. I do not have access to many DCE examples, so please tell me if I missed any variations. I downloaded samples from The Cancer Imaging Archive (TCIA) which includes DCE sequences from Siemens, Philips and GE. When it detects DCE images that will be stacked, it generates a message letting you know that you can use the
|
@neurolabusc thank you so much for working on this! I will comment once I get a chance to test.
No, I don't have an easy way. The current implementation was driven by specific datasets... The way Slicer handles multivolume parsing is to apply multiple parsing strategies, and give users freedom to choose from multiple results. I think you found exactly same dataset that I used for Slicer loading support. I don't have any separate collection of a variety of DCE examples either. At this moment, I was only considering |
I realized I probably could answer your question better ... I will point to the code and give more details a bit later, need to run now. |
Great. Since slicer already has a bunch of Python code, you might also want to evaluate @icometrix's dicom2nifti. This might be able to provide a clean solution without needing to communicate via text files. |
I have more confidence in |
OK. At the moment dcm2niix handles multi-frame from Philips, Siemens (Vida XA10A, though no tool can rescue Vida data saved on the console as mosaics or de-identified) and Bruker. I think these are all the enhanced formats seen in practice. I have never tested the generic/reference enhanced DICOM example reference images, as each vendor came up with their own creative definition of enhanced DICOM. |
Knowingly or not, but (speaking from experience) you can also handle legacy enhanced MF! |
Closing issue. Requested feature is integrated in development branch, will be included in next release. |
Thanks a lot Chris! 👍 |
@fedorov I am not sure if you ever implemented this feature. I have changed the behavior a little bit. Previously, all DICOMs had to belong to the same series, and only a single output NRRD/NIfTI image was generated. The new behavior is that if multiple series are specified, multiple NRRD/NIfTI images will be created. This turns out to be a handy way to live with the macOS App Sandbox restrictions. |
* tag 'v1.0.20210317': (23 commits) CI: Travis updates submodules always from remote. Update dcm_qa_nih submodule. Remove diagnostic message help should describe accession number (rordenlab#496) Describe and provide kludge for mangled Canon DICOMs (rordenlab#495) Update Philips notes (rordenlab#493) Update dcm_qa submodule. Support Canon Enhanced DICOM (rordenlab#491) Use first recognized manufacturer tag (rordenlab#487) If mosaics where ANY volume is non-planar, save ALL volumes as 3D(rordenlab#481) Add notes Kludge to separate vNav files as 3D (rordenlab#481) Tell user to override merging (-m o) to separate coils, specific with fmrib usage that disrupts Siemens DCE processing (rordenlab#187) Forbid semicolon in filenames as Linux uses this for command concatenation and Windows function GetOpenFileName will truncate (rordenlab#425) report totalReadoutTime once EstimatedEffectiveEchoSpacing -> EffectiveEchoSpacing (rordenlab#480) GE Round factor for Total Readout Time Update explicit naming of DICOMs (rordenlab#252), GE file naming changes (rordenlab#476) Update issue templates GE TotalReadouTime, BEP009 fixes (rordenlab#476) ...
Currently, if I understand correctly,
dcm2niix
accepts as input name of the folder with the files to be converted. In some situations, the expectation of having all input files (and no other DICOM files) in a single folder is not consistent with the organization of files used by other systems. As a specific example, we would like to investigate integration ofdcm2niix
with 3D Slicer, and in 3D Slicer no expectation on how DICOM files are sorted can be made (the user may choose not to copy at all the files from the original location they were imported from). It would be convenient if the list of files to be used in the conversion could be specified in a configuration file of some sort. Otherwise, we will need to copy input files to a temporary folder just for the purposes of the conversion. Could this feature request be considered?The text was updated successfully, but these errors were encountered: