QuantitativeReporting icon indicating copy to clipboard operation
QuantitativeReporting copied to clipboard

Replace inputDICOMList with inputDICOMDirectory for SEG converter

Open fedorov opened this issue 8 years ago • 8 comments

Exceedingly long command line can cause problems on Windows

https://github.com/QIICR/QuantitativeReporting/blob/master/Py/QuantitativeReporting.py#L482

fedorov avatar Apr 07 '17 15:04 fedorov

question from @chribaue

Can we now assume that Slicer has stored all the dicom files of the references scan in the same directory and that there are no other dicom files in that folder? Or do I need copy all the dicom files to a temp folder?

che85 avatar Apr 07 '17 15:04 che85

As far as I know, Slicer organizes everything on the filesystem in studies/series. So assuming that all images belong to the same series, they should be in the same directory and no temporary copy would be needed.

I will look into this and get back to you.

che85 avatar Apr 07 '17 15:04 che85

Answering my own question: When importing Dicom files into Slicer, you have the option to only add links to these files to the Slicer Dicom database instead of copying them. And we cannot make any assumptions on how the Dicom files were organized before importing them to Slicer.

chribaue avatar Apr 07 '17 15:04 chribaue

@chribaue you are right - DICOM has no standard requirement for directories only containing a single series. In fact, the standard for external storage (e.g. dvd) is explicit that you cannot rely on that organization and need to either look at the files or use the DICOMDIR. Slicer doesn't use the DICOMDIR because it's often not available when you get the files from a scanner or other source directly. You can use the slicer dicom database to find which files are in which places.

Or outside of slicer there are many utilities to sort - here's one: https://github.com/pieper/dicomsort

pieper avatar Apr 07 '17 15:04 pieper

Yes, we cannot rely on one directory per series.

What we can do is add an option in dcmqi to pass the list of DICOM files in the metadata JSON. Let's think about this option.

fedorov avatar Apr 07 '17 15:04 fedorov

Any new thoughts on this?

I could work around this issue by copying all dicom files to a temporary directory, if it's too troublesome to change the interface of dcmqi.

chribaue avatar May 01 '17 18:05 chribaue

@chribaue yes, I think it is best to copy for now. There is a very long list of issues/features that need to be addressed for dcmqi, and we have very limited resources for the development (and at the moment, @che85 is on vacation, so it's just me!), so we need to prioritize.

fedorov avatar May 01 '17 18:05 fedorov

Besides making that work with dcmqi, I could add a drop field to the meta generator so that users can just drop the files there and those absolute paths will be added to the json output. @fedorov what do you think?

che85 avatar May 08 '17 15:05 che85