# How to use "DICOM Export" without changing/removing tags of DICOM?

**URL:** <https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178>\
**Category:** Support\
**Created:** [September 24, 2018, 2:53pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178 "2018-09-24T14:53:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 24, 2018, 2:53pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/1 "2018-09-24T14:53:39Z")

</div>

Hi  
Dear developers and users

After using “DICOM Export” for a series images of PET, I get dicom files that these tages (DICOM metadata) are changed or removed (Attributes as “Modality”, “ **PatientName** ”, “ **RescaleIntercept** ”, “ **RescaleSlope** ”, “ **RescaleType** ” and many other tags).

I can edit these tags using softwares such as “DicomBrowser”, but this is a very time consuming task and it’s not accurate. I think that 3DSlicer must be able to do it.

At now, my question:  
How can I use “DICOM Export” for one series images of PET processed without changing or removing non of original tags of DICOM?

Please guide me,  
Thanks a lot,  
Shahrokh

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 24, 2018, 4:11pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/2 "2018-09-24T16:11:21Z")

</div>

Patient and study level tags can be preserved by exporting them from the same patient/study. Or if you export one and want to export more, then check the Save tags checkbox when exporting after editing these fields.

RescaleIntercent and slope are volume-specific tags that I don’t think the ScalarVolume exporter plugin can currently provide.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [September 25, 2018, 2:28am UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/3 "2018-09-25T02:28:33Z")

</div>

You can open DICOM Browser, select the data you want to export, and click right mouse button to select the location on disk to export to.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/d/8db459e3901d776587482ed2ec0989d3a92eca26.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 25, 2018, 1:17pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/4 "2018-09-25T13:17:36Z")

</div>

Yes you can do this if your volume has not changed. But then why would you want to use Slicer for export if you already have it…

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [September 25, 2018, 1:45pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/5 "2018-09-25T13:45:48Z")

</div>

I obviously don’t know what the user actually wants to do… But there are many situations where one might want to export from DICOM Browser, such as DICOM series was created by Slicer, need to export to move the file to another computer/dropbox/flashdrive. Sorry if my response only added confusion.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 25, 2018, 1:59pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/6 "2018-09-25T13:59:19Z")

</div>

Not at all, I just pointed out that what we can see in the DICOM browser is the original data. If we change it in any way, then we’ll need to go through the 1) subject hierarchy DICOM exporter or the 2) Create DICOM series module (which is a legacy module as far as I’m concerned, but it can still probably do things that the other one cannot).

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [September 25, 2018, 2:12pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/7 "2018-09-25T14:12:04Z")

</div>

> [@cpinter](#):
>
> what we can see in the DICOM browser is the original data

Yes, but with few exceptions. PETDICOM extension plugin transparently creates a new DICOM RWVM series that gets added to the DICOM DB, and so does QuantitativeReporting creating new SEG and SR series.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 27, 2018, 5:24am UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/8 "2018-09-27T05:24:17Z")

</div>

Dear Csaba and Andrey

Thanks a lot for your guidance. Sorry I did not give any feedback.  
I have to point out what I want to create three landmarks on PET/CT images and then export them to TPS for doing research.  
After adding the landmarks to both two series of PET/CT images, I do what Andrey pointed out. As you mentioned in your messages, this method does not apply changes in new DICOM series.  
I do this work (editing DICOM tags) using DicomBrowser.

It seems that Pydicom can do it, but when I want to install and use it in Python Interactor of 3DSlicer, I get the following error:

> > > import pip  
> > > pip.main([‘install’, ‘pydicom’])  
> > > Requirement already satisfied: pydicom in ./Slicer-4.8.1-linux-amd64/lib/Python/lib/python2.7/site-packages  
> > > You are using pip version 9.0.1, however version 18.0 is available.  
> > > You should consider upgrading via the ‘pip install --upgrade pip’ command.  
> > > 0  
> > > import pydicom  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > ImportError: No module named pydicom

I was looking for commands in Python and Slicer API smiliar to dicominfo (to edit tags) and dicomwrite.  
Please guide me if such commands/functions are available in Slicer API and python.

Please guide me.  
Shahrokh

---

<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:** [September 27, 2018, 5:26am UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/9 "2018-09-27T05:26:54Z")

</div>

pydicom is already bundled with Slicer. Use `import dicom` (and not `import pydicom`).

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 27, 2018, 5:38am UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/10 "2018-09-27T05:38:59Z")

</div>

Thanks a lot Andras.  
Where can I find tutorials about using **dicom** in 3DSlicer to edit tags and then write DICOM files?

---

<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:** [September 27, 2018, 6:19pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/11 "2018-09-27T18:19:19Z")

</div>

It’s a regular Python package, so there is no Slicer-specific tutorial, just check out their [website](https://github.com/pydicom/pydicom) about how to use it.

---

<div class="post-metadata">

**Author:** ![Dex2046](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dex2046/32/65593_2.png) [@Dex2046](https://discourse.slicer.org/u/Dex2046)\
**Post date:** [December 17, 2023, 12:31pm UTC](https://discourse.slicer.org/t/how-to-use-dicom-export-without-changing-removing-tags-of-dicom/4178/12 "2023-12-17T12:31:49Z")

</div>

Hi, I met a quite similar problem, so may I know how to solve the problem?
