# DICOM metadata transfer

**URL:** <https://discourse.slicer.org/t/dicom-metadata-transfer/35207>\
**Category:** Support\
**Tags:** dicom, nifti\
**Created:** [April 1, 2024, 7:36pm UTC](https://discourse.slicer.org/t/dicom-metadata-transfer/35207 "2024-04-01T19:36:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bahram\_Zargar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_zargar/32/67116_2.png) [@Bahram\_Zargar](https://discourse.slicer.org/u/Bahram_Zargar)\
**Post date:** [April 1, 2024, 7:36pm UTC](https://discourse.slicer.org/t/dicom-metadata-transfer/35207/1 "2024-04-01T19:36:37Z")

</div>

Hi Slicer team!  
I wish to export the Dicom mri as a new file after segmenting it, however the new series of DICOMs lacks many of the original DICOm files’ tags. Is it possible to move the metadata from one series of the Dicom mri to another?  
Thank you!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 1, 2024, 7:41pm UTC](https://discourse.slicer.org/t/dicom-metadata-transfer/35207/2 "2024-04-01T19:41:48Z")

</div>

We only transfer metadata that is needed for making derived images show up at the same patient/study. Why would you need to copy more fields to the processed MRI image? What is your overall clinical goal?

---

<div class="post-metadata">

**Author:** ![Bahram\_Zargar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_zargar/32/67116_2.png) [@Bahram\_Zargar](https://discourse.slicer.org/u/Bahram_Zargar)\
**Post date:** [April 1, 2024, 8:06pm UTC](https://discourse.slicer.org/t/dicom-metadata-transfer/35207/3 "2024-04-01T20:06:05Z")

</div>

The goal is the have the new dicom series with applied masking, which has all the tags of the original one, except updating the AccessionNumber, StudyDescription, and SOPInstanceUID. I do have a python script to do updating of those specific tags, however the slices are missing lots of information from the original dicom series.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 1, 2024, 9:05pm UTC](https://discourse.slicer.org/t/dicom-metadata-transfer/35207/4 "2024-04-01T21:05:04Z")

</div>

If you alter the image content then there is not a lot that you are allowed to copy from the original image. But anyway, if you want to set some additional tags then probably the easiest is to let the current exporter to create the output files and then modify them using pydicom or dcmtk. You can add a custom plugin that performs this patching as part of the DICOM export process; or in your module you can perform the export and then patch the generated files.
