fedorov / MultiVolumeImporter

A 3D Slicer module to support import of multi-volume data from non-DICOM sources, and provide plugin for importing such data from images saved in DICOM.
http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/MultiVolumeImporter
Other
9 stars 25 forks source link

ENH: Allow loading of multi-volumes when multiple series are selected in the DICOM browser #20

Closed lassoan closed 8 years ago

lassoan commented 8 years ago

examineFilesIPPAcqTime fails to recognize 4D Cardiac CT data sets (acquired on Siemens Somatom Definition CT) if multiple series are selected in the DICOM browser. The problem is that if all selected series are passed to examineFilesIPPAcqTime then the extra series cause varying slice number for each IPP value, so nSlicesEqual becomes false.

The solution is to pass series to examineFilesIPPAcqTime one-by-one.

Note that I've removed examineFilesIPPAcqTime(allfiles), because most probably examineFilesIPPAcqTime would always fail when it gets multiple series. If you know for sure that there are cases when examineFilesIPPAcqTime has to put together a multi-volume from multiple series then examineFilesIPPAcqTime(allfiles) should note be removed.

fedorov commented 8 years ago

Thanks for the PR. Let me review and think about this, and I will get back to you.

Do you have a sample dataset for the specific use case you mentioned?

I am quite busy with other things, so I won't be able to answer quickly, sorry about that ...

lassoan commented 8 years ago

Yes, I have sample data set and tested this patch with that but I cannot easily share it. If you have a test suite that you would add this new type of data set to, then I could try to find some time to anonymize the data set and clean the image contents.

fedorov commented 8 years ago

Unfortunately, I don't. Part of the reason is data ownership, another part is that these datasets tend to be very large. The history of this plugin is that "fixes" are added as needed. A test dataset would help understand what is going on quicker. I will follow up on your initial comment.

lassoan commented 8 years ago

Same issue here. Each 4D CT is about 1.5GB and cannot be publicly shared.

The problem with examineFilesIPPAcqTime is that if it finds that not all content times have the same number of IPPs then it returns with failure (and I think this always happens when there are multiple unrelated series are selected in the DICOM browser).

If you don't remove examineFilesIPPAcqTime(allfiles) then there is no risk of breaking anything. So, if you don't have time to test right now then you could just add examineFilesIPPAcqTime(files).

fedorov commented 8 years ago

The reason that was added is because some machines save DSC sequence in multiple series that have identical number of slices, where each series corresponds to a timepoint. If I remove this call, we won't be able to support that type of data. I guess if you not remove the call to allfiles, should be ok to integrate.

lassoan commented 8 years ago

OK, it makes sense. I'm not at my computer anymore. It would be great if you could make the change (just add the per-series examineFilesIPPAcqTime) and integrate it. Thank you!

fedorov commented 8 years ago

Sure, will do it

lassoan commented 8 years ago

Thank you very much!