[ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO

Marcos fotosentido at gmail.com
Sat Aug 29 16:51:37 EDT 2015


Hi,

I'm using this example:
http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadPrintTags_8cxx-example.html

to try to get metadata info, but it never gets into the while:

typedef itk::MetaDataDictionary DictionaryType;

itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();

const DictionaryType &dic = dicomIO->GetMetaDataDictionary();


typedef itk::MetaDataObject<std::string> MetadataStringType;

DictionaryType::ConstIterator itr = dic.Begin();

DictionaryType::ConstIterator end = dic.End();


while (itr != end)

{

...

}



It doesn't depend on the file, I'm using it inside that while. But I
never get into. The two iterators are the same? Why?


I'm using ITK 4.8.0.


The code is fine, right?


Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150829/c5451549/attachment.html>


More information about the Insight-users mailing list