wadqc / WAD_Python

WAD analyse modules in Python
GNU General Public License v3.0
2 stars 3 forks source link

Issue with DCM4CHEE hosted data #6

Closed jhuguetn closed 9 years ago

jhuguetn commented 9 years ago

Hi there,

I am willing to use WAD-QC (and WAD-Python, pywad) for managing, deploying and running my own QC tests in a regular basis on MRI scanners.

Functional MRI scans may contain a large number or files and somehow, Dcm4chee splits series files in different subdirs (even though they are logically seen as a unique series instance).

The function wadwrapper_lib.prepareInput() checks if all scan input XML data files are in the same directory but due to such Dcm4chee particular method at storing image files, given function raises an expection:

----- Evaluating runTest in Plugin_development.MRI.MRI_fBIRN.fBIRN_plugin -----
...
File "/var/www/WAD-IQC/uploads/analysemodule/pywadplugin/pyWADLib/wadwrapper_lib.py", line 351, in prepareInput
    raise ValueError("{} ERROR! multiple would-be dicom files scattered over multiple dirs!".format(logTag))
ValueError: [fBIRN_plugin]  ERROR! multiple would-be dicom files scattered over multiple dirs!

Any ideas?

asch99 commented 9 years ago

Great to hear that you're working on a fBIRN plugin. That's one on my 'wanted' list, so if you have something working, don't forget to send a pull request. Regarding your question, the wadwrapper_lib.prepareInput() is a very specific input function written for my plugins ported to WAD-Python. I don't know of anyone using it except me (and possibly you). As a solution for your issue, it is recommended to use the more generic solution: from pyWADLib import pydicom_series as dicomseries dcmseries = dicomseries.read_files(input,showProgress=False, readPixelData=False,skipNonImageFiles=True) with 'input' being a list of files, or the name of a directory.

jhuguetn commented 9 years ago

Thanks for your prompt reply.

I forked the WAD_Python project to my own workspace to work on that (right now I am working in Signal Fluctuation Noise Ratio test), so once is mature enough I would be happy to send a pull request proposal to main wadqc repository.

Generic function dicomseries.read_files() is working fine as suggested for MRI ...expect when dealing with enhanced DICOM MRI scans. There, just crashes (pydicom_series._finish() is not able to detect the PixelSpacing tag, probably because info is nested in sequence) and returns a void object.

One of the reasons why I decided to use wadwrapper_lib.prepareInput() method was that it has special flow for reading an enhanced DICOM instance.

But no worries, I will try to implement my own solution based on what is available.