Closed ctzavaras closed 3 years ago
Here's one example where dcmqi was used from a python script to do conversion in batch: https://github.com/QIICR/lidc2dicom/blob/master/lidc2dicom.py#L94-L99.
You should be able to do something similar for your task.
@fedorov Thank you again!
So if I got it right by reading the code in the example above, I can run dcmqi by the module subprocess.Popen() and this module will call the dcmqi in a command prompt window ,right?
That's right - you need to install dcmqi on your system using the latest release binary available here: https://github.com/QIICR/dcmqi/releases, and make sure the dcmqi binaries are available in your system path. After that you can use the approach in that script to call the converter and pass inputs as files.
@fedorov Perfect! Thank you again!
No problem. I will close this issue, but please reopen if you run into issues with this approach.
That's right - you need to install dcmqi on your system using the latest release binary available here: https://github.com/QIICR/dcmqi/releases, and make sure the dcmqi binaries are available in your system path. After that you can use the approach in that script to call the converter and pass inputs as files.
@fedorov Hello again! I downloaded the zip file for windows from the link that you provided, but there are some exe files that they don't do anything when I run them. So, do I have to do something else in order to use them or should I build from source first in order to run dcmqi in windows(as it is said in the guide)?
I don't have a windows machine handy, but from what I recall, the terminal may not show the console output when running command line tools. Are you saying nothing shows up in the terminal when you run those exe files with --help, for example?
No, you don't need to build from source! I need to update the documentation - that page was written before we established a process to publish binaries for all platforms under releases.
@fedorov Eventually, I figure it out. I used cmd to go to the folder that the exe files are located and I executed the command with the arguments that I found in help and it worked. Thank you very much!
Greetings, I was wondering if it is possible to use dcmqi in a python script or if there is a way to use it in order to convert automatic many Dicom segs to Nrrd files?
Thank you in advance! Chris