QIB-Sheffield / wezel

Prototyping quantitative medical imaging applications
Apache License 2.0
0 stars 6 forks source link

Auto Importing (via XNAT) #5

Closed JoaoPeriquito closed 2 years ago

JoaoPeriquito commented 2 years ago

Download via XNAT using "MDRauto" is complete, however it gives an error, when the freshly downloaded dataset is opening

"app.open(os.path.join(downloadFolder, dataset.label))" on the xnat.py script does not seem to work properly it stops on the python script called "folder.py" (line 61): return self.required + self.dict['attributes']

with the following error: "TypeError: can only concatenate list (not "dict") to list"

self.required is ['PatientID', 'StudyInstanceUID', 'SeriesInstanceUID', 'SOPInstanceUID', 'SOPClassUID', 'NumberOfFrames', 'PatientName', 'StudyDescription', 'StudyDate', 'SeriesDescription', 'SeriesNumber', 'InstanceNumber', 'AcquisitionTime']

self. dict ['attributes'] is {}

JoaoPeriquito commented 2 years ago

if I say self. dict ['attributes'] = [] (instead of a {}) it works, but I don't know where or how should I do this to minimize the impact of this change

plaresmedima commented 2 years ago

Hi joao,

The current version of folder.py in dbdicom does that correctly I think:

https://github.com/QIB-Sheffield/dbdicom/blob/main/dbdicom/folder.py

line 61 is:

return self.required + self.dict['attributes']

Maybe the dbdicom inside iBEAt is still an older version?

Prof. Steven Sourbron, PhD Chair in Medical Imaging Physics University of Sheffield, UK https https://www.sheffield.ac.uk/medicine/people/iicd/steven-sourbron://www.sheffield.ac.uk/medicine/people/iicd/steven-sourbron https://www.sheffield.ac.uk/medicine/people/iicd/steven-sourbron Sheffield abdominal imaging research page https://www.sheffield.ac.uk/medicine/research/research-themes/medical-imaging/medical-imaging-research/abdominal-imaging Open source initiative in perfusion imaging http://www.osipi.org Magnetic resonance imaging biomarkers for chronic kidney disease https://renalmri.org/

On Wed, 22 Jun 2022 at 17:29, JoaoPeriquito @.***> wrote:

if I say self. dict ['attributes'] = [] (instead of a {}) it works, but I know where or how should I do this to minimize the impact of this change

— Reply to this email directly, view it on GitHub https://github.com/QIB-Sheffield/weasel/issues/5#issuecomment-1163343431, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOFKAZC247IYXL7PR2OAS3VQM5QHANCNFSM5ZQVISAA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

plaresmedima commented 2 years ago

This was a bug in dbdicom - should be fixed now so please get the latest dbdicom version and try again.