-
assigned issue to
Enable import of *. dcm
Enhancement request from David Platten - would be nice to be able to write openrem_rdsr *.dcm to import a folder full of files at once
Comments (20)
-
reporter -
I've made a quick patch to fix this in the short term. I've put it in my fork. It allows a directory as an argument and processes all DCM files in that. A more elegant solution would be to allow a choice of file extension as an argument and optional processing of subdirectories, but this mitigates the issue for now.
-
reporter Can you put in a pull request so I can see how that works. I'm hoping that the system will facilitate me taking that change without merging all your other changes.
-
reporter A little googling suggests that this could actually work as David requested by simply assuming an array of strings will be passed. If used conventionally, the array will be one string long. If wildcards are used in the shell, then they will be expanded before openrem_rdsr.py sees it.
-
I've submitted a pull request. I think I've done it correctly.
-
reporter Modified the script portion of rdsr import to allow for mulitple arguments (files), or wildcard shell expansion such as *.dcm. Will need to be duplicated to the other import scripts. Refs
#9.→ <<cset 4b069c1f85fd>>
-
reporter Modified JA Cole patch to incorporate both techniques to solve this issue. Possibly overcomplicated things. Needs testing. Refs
#9.→ <<cset d9ff551e9754>>
-
reporter Should fail if less than two args, not 2 or less. Tested. Refs
#9. If keeping this solution, needs implementing for other scripts.→ <<cset a21e3be53dd4>>
-
reporter - changed milestone to 0.4.0
-
reporter - changed status to resolved
Fixes
#9. Can now pass a list of dicom files to each of the rdsr, mg and ctphilips scripts. Typical syntax would be 'openrem_rdsr.py myfiles/*.dcm'. Will abandon other branch as it was too complicated for what was needed.→ <<cset ea314ec35474>>
-
reporter - changed status to open
Reopening as the Windows cmd.exe shell doesn't do wildcard expansion, instead relying on the application to do it.
Therefore passing *.dcm to openrem_rdsr.py will try and process the file *.dcm
-
reporter Changed Windows path advise to match my install, added information about wildcard expansion for linux and that it doesn't currently work for the standard Windows shell (refs
#9), changed styling of commands to be sourcecode.→ <<cset 3fbb8a415746>>
-
reporter Added ref
#91,#107and#108to changes. Added ref#9as a reopened issue.→ <<cset 257c0dc54eba>>
-
reporter Issue ref
#9was being dislayed in the same bullet point list, so separated it with a subtitle.→ <<cset 9834fdaf053e>>
-
reporter - changed milestone to Future
Changing milestone from 0.4.0 to future for this re-opened issue due to Windows shells not expanding variables like linux and Windows powershells do.
-
reporter - changed milestone to 0.5.0
-
reporter - changed status to resolved
Added glob to allow Windows users to use *.dcm as the standard shell doesn't expand wildcards. Should fix
#9again, needs testing.→ <<cset 2baec318e15f>>
-
reporter - changed status to open
Fix in beta release three actually broke all imports from any platform, as it was feeding a list to glob which requires a string.
-
reporter - changed status to resolved
Modified scripts to glob the filenames so that in Windows * wildcards will be expanded. Modified rdsr.py and ct_philips.py as they had a sys.exit if the study existed in the database, which then made the glob versions of the scripts stop. Should fix
#9again.→ <<cset 57c06b5f7530>>
-
reporter Removed the reference to importing using * in linux or advanced windows shell, and ref
#9.→ <<cset cc2ff5d40f94>>
- Log in to comment