# SimpleITK can not obtain the 0020|000D DICOM tag

**URL:** https://discourse.itk.org/t/simpleitk-can-not-obtain-the-0020-000d-dicom-tag/3594
**Category:** Beginner Questions
**Created:** [November 4, 2020, 1:58pm UTC](https://discourse.itk.org/t/simpleitk-can-not-obtain-the-0020-000d-dicom-tag/3594 "2020-11-04T13:58:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.itk.org/user_avatar/discourse.itk.org/zhang-qiang-github/32/1183_2.png) [@zhang-qiang-github](https://discourse.itk.org/u/zhang-qiang-github)
#### Post date: [November 4, 2020, 1:58pm UTC](https://discourse.itk.org/t/simpleitk-can-not-obtain-the-0020-000d-dicom-tag/3594/1 "2020-11-04T13:58:28Z")

</div>

I want to use SimpleITK to obtain the tag information, and the code is:

```auto

    reader = sitk.ImageFileReader()
    reader.SetFileName(fileName)
    reader.LoadPrivateTagsOn()
    reader.ReadImageInformation()
    if reader.HasMetaDataKey('0020|000D'):
        val = reader.GetMetaData(tag)
        Val[tag] = val
    else:
        Val[tag] = ''

```

and it return ‘’, which means the SimpleITK can not obtain the ‘0020|000D’ tag. However, I use [radiant](https://www.radiantviewer.com/) to open the dicom, and it can give the ‘0020|000D’ tag:

 ![image](https://discourse.itk.org/uploads/default/original/2X/a/af6ad2bab7336b57e3bb5f1644e5d19d58c5e889.png)

Is there any wrong with my SimpleITK code ?

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [November 4, 2020, 2:07pm UTC](https://discourse.itk.org/t/simpleitk-can-not-obtain-the-0020-000d-dicom-tag/3594/2 "2020-11-04T14:07:18Z")

</div>

Hello @zhang-qiang-github,

Minor issue with your code, uppercase, D, in tag instead of lowercase, d. Use ‘0020|000d’ to get the tag value.

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.itk.org/user_avatar/discourse.itk.org/zhang-qiang-github/32/1183_2.png) [@zhang-qiang-github](https://discourse.itk.org/u/zhang-qiang-github)
#### Post date: [November 4, 2020, 2:22pm UTC](https://discourse.itk.org/t/simpleitk-can-not-obtain-the-0020-000d-dicom-tag/3594/3 "2020-11-04T14:22:16Z")

</div>

@zivy Thank you very much ~~~
