# Overlay data Probleam

**URL:** https://discourse.itk.org/t/overlay-data-probleam/4204
**Category:** Uncategorized
**Created:** [June 11, 2021, 10:02am UTC](https://discourse.itk.org/t/overlay-data-probleam/4204 "2021-06-11T10:02:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![qiangw21](https://discourse.itk.org/user_avatar/discourse.itk.org/qiangw21/32/2139_2.png) [@qiangw21](https://discourse.itk.org/u/qiangw21)
#### Post date: [June 11, 2021, 10:02am UTC](https://discourse.itk.org/t/overlay-data-probleam/4204/1 "2021-06-11T10:02:22Z")

</div>

I can’t read overlay data (6000, 3000). The code below.  
The result is always “AAAAAAAAAAAAAAAAA…”

```auto
    using ItkPixelType = signed short;
	constexpr unsigned int Dimension = 2;
	

	using ImageType = itk::Image<ItkPixelType, Dimension>;
	using ReaderType = itk::ImageFileReader<ImageType>;

	ReaderType::Pointer reader = ReaderType::New();
	using ImageIOType = itk::GDCMImageIO;
	ImageIOType::Pointer dicomIO = ImageIOType::New();

	reader->SetFileName(filename);
	reader->SetImageIO(dicomIO);

	try {
		reader->Update();
	}
	catch (itk::ExceptionObject &ex) {
		std::cout << ex << std::endl;
		return EXIT_FAILURE;
	}

	using DictionaryType = itk::MetaDataDictionary;
	const DictionaryType &dictionary = dicomIO->GetMetaDataDictionary();

	using MetaDataStringType = itk::MetaDataObject<std::string>;

	using MetaDataUint8Type = itk::MetaDataObject<unsigned char>;

	std::string overlay_data;
	dicomIO->GetValueFromTag("6000|3000", overlay_data);

```

Thanks,  
wq

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 11, 2021, 2:36pm UTC](https://discourse.itk.org/t/overlay-data-probleam/4204/2 "2021-06-11T14:36:29Z")

</div>

What do other DICOM tag readers (e.g. [Slicer](https://www.slicer.org/)) say your file contains in “6000|3000”? What does [this example](https://public.kitware.com/pub/itk/Examples/src/IO/GDCM/ReadAndPrintDICOMTags/Documentation.html) print?

---

<div class="post-metadata">

### Author: ![qiangw21](https://discourse.itk.org/user_avatar/discourse.itk.org/qiangw21/32/2139_2.png) [@qiangw21](https://discourse.itk.org/u/qiangw21)
#### Post date: [June 15, 2021, 1:42am UTC](https://discourse.itk.org/t/overlay-data-probleam/4204/3 "2021-06-15T01:42:50Z")

</div>

Sorry, I can’t open your link. I read my dicom with RadiAnt DICOM Viewer, and it shows **(6000, 3000) 0000 0000 0000 0000 …**

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 15, 2021, 3:26pm UTC](https://discourse.itk.org/t/overlay-data-probleam/4204/4 "2021-06-15T15:26:41Z")

</div>

You may need to do base64 decoding for binary tags. See [Supported DICOM metadata types](https://discourse.itk.org/t/supported-dicom-metadata-types/665).

Here is an updated link for the [example](https://itk.org/ITKExamples/src/IO/GDCM/ReadAndPrintDICOMTags/Documentation.html).

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [August 5, 2021, 12:04am UTC](https://discourse.itk.org/t/overlay-data-probleam/4204/5 "2021-08-05T00:04:27Z")

</div>

> [@qiangw21](#):
>
> I can’t read overlay data (6000, 3000).

Overlay is a very, very old way of storing a few binary bitmap layers that can be displayed over the image. It is also very limited in that there is no standard way of specifying what the overlay contains (with proper standard terminology), number of layers are limited, the layers are stored along with the image (so if you change the layers then you need to store the entire image again), etc. Most modern software do not use this DICOM tag (especially not for quantitative analysis) and you cannot expect any software or libraries to add support for it today.

Instead, segmentations should be stored in DICOM Segmentation Objects, and measurements in DICOM Structured Reports.
