Conver batch of nrrd files to DICOM


I want to convert a batch of a few hundred scans from nrrd to DICOM. I have been reading about using the create a dicom series in the CLI (including this topic: Convert NRRD to DICOM), but I’m still unsure how to use this is practice as I’m new to slicer.
Can I run the python scripts in my own python IDE, or do I have to use the python console in Slicer?
And how can I give a batch of nrrd files as the input for the script?

Thank you in advance!

You can use the PythonSlicer interpreter outside of slicer (e.g. configure your IDE to use it instead of the system python). To find the path to this interpreter you can use the following commands in the python console of Slicer:

import sys

I think your second question is more a python question than a slicer question. You can adapt this script to loop over the nrrd files in python and convert them one by one.

I hope this answers your questions