How to save nrrd as a dicom file?

After I used the brainsFit plug-in for slicer to register two dicoms, I got a node object. I plan to export this node to show it to others, but I didn’t find how to use code to convert node object to dicom series file. Somebody helped. Me?
I know that DICOMScalarVolumePlugin and DicomRtImportExported can do this, but I don’t know where to find their calling function.
So my question is as follows (using scripting):
1.How to add a patient’s(and study) node to a node object?
2. Which commands and function can be used to add patient’s tag information and set the output folder?
If anyone knows these questions, can you help me? Thank you very much!
3534

Or there are other ways to export the registered image into dicom

I convert nrrd to dicom using slicer’s Create a DICOM Series module. You can input the important metadata as well. It is also available as CLI so you can call it with some arguments in your python script.

In Data module / Subject hierarchy tab, drag-and-drop the series under the study.

Do you mean using Python scripting? Have you exported successfully using the graphical user interface?

Thank you very much. I used your method and succeed.

Yes, thanks for your help, I want to use python script to convert volume to dicom series. I use the method provided by @brhoom and succeed. Thank you, the people in the Slicer community are very enthusiastic。

For reference, ProstateMRIUSContourPropagation module implements a complete clinical workflow for registering prostate MRI to ultrasound images. All inputs are imported from DICOM and registered images are written to DICOM. See a short demo of the module:

If you need a similar tool that can register clinical images that you retrieve from PACS and you can push back to a PACS then you can use this module as a starting point. It is implemented in Python, so it should be very easy to adapt it to your specific use case.

2 Likes

In fact, I am looking for a way to register MR images on CT images,and export it to dicom-series for display. Thank you very much for your suggestion. This plugin may solve my problem.

1 Like