Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Latest commit

 

History

History
61 lines (24 loc) · 1.74 KB

uploading-dicom-files-to-item-how-to-bypass-the-limit.md

File metadata and controls

61 lines (24 loc) · 1.74 KB

Uploading DICOM files to Item: How to bypass the limit?

LucasGandel on 2018-05-15T12:35:18.615Z

When uploading series of DICOM files into a single item, checking of already existing files misbehave after the 50 first files have been checked. All files after the 50th will be re-uploaded.

I’m using the following python client command:

client.upload(localDICOMFolder, DICOMFolder['_id'], parentType='folder', leafFoldersAsItems=True, reuseExisting=True, blacklist=None, dryRun=False)

Increasing the DEFAULT_PAGE_LIMIT in girder_client/init.py does not help. My guess is that the isFileCurrent() function (called from upload()) should use this variable to specify the request return limit. Changing line 804 of girder_client/init.py to the following does the trick:

itemFiles = self.get(path, parameters = {'offset':0, 'limit':DEFAULT_PAGE_LIMIT})

Not sure this is a bug or me using the upload function in a wrong way. Any idea?

By the way, is there any better way to define the DEFAULT_PAGE_LIMIT variable, other than changing it directly in the init.py script?

Thank you very much,

Lucas


Jonathan_Beezley on 2018-05-15T12:48:09.312Z

You have the right idea. It looks like a bug to me. I think the correct solution is to replace the lines _init_.py 839-840 with

itemFiles = self.listFile(itemId)

This will iterate through all files in the item.


LucasGandel on 2018-05-15T12:53:28.453Z

Jonathan_Beezley:

itemFiles = self.listFile(itemId)

Works well and much cleaner! Thanks a lot!