From Ohm

ITK Meta Data Dictionary

Or print the contents of the Meta Data Dictionary, which contains the dicom tags as key-value pairs:

// get meta data
typedef itk::MetaDataDictionary DictionaryType;
typedef itk::MetaDataObject<std::string> MetaDataStringType;
const DictionaryType &dict = reader->GetMetaDataDictionary();

// print meta data
DictionaryType::ConstIterator itr = dict.Begin();
while (itr!=dict.End())
{
   itk::MetaDataObjectBase::Pointer entry = itr->second;
   MetaDataStringType::Pointer entryvalue = dynamic_cast<MetaDataStringType *>(entry.GetPointer());
   std::string tagvalue = entryvalue->GetMetaDataObjectValue();
   std::cout << "key=" << itr->first << " value=" << tagvalue << std::endl;
   ++itr;
}

Retrieved from http://schorsch.efi.fh-nuernberg.de/roettger/index.php/MedicalVisualization/ITKMetaDataDictionary

Page last modified on November 16, 2020, at 11:13 PM