I have nifti (.nii.gz) scalar volumes and I wanted to convert them into DICOM format and extract information from the metadata (IOP and IPP). I had done this manually using the 3D Slicer GUI. As there are multiple nifti files that need to be converted, I wanted to automate the process using the Slicer Python interface. Please see the code below.
I am stuck after this step. Manually, I would go to the CreateDICOMSeries module, choose the input volume and select apply. Is there a way to implement these steps in the python interface?
This code snippet runs successfully and generates a DICOMExportScalarVolume object. But upon examining the DICOM metadata no information is visible. Please see the image attached.
I did not face this issue while using the CreateDICOMSeries module GUI.
I can’t figure out where I’m going wrong and would greatly appreciate some help.
Thanks in advance!
If you want to be able to export other DICOM data objects (e.g., segmentation, RT structure set, …) then you can use export plugins of the DICOM module as shown in the script repository.