[ITK] [ITK-users] Can't iterate over MetadataDictionary from GDCMImageIO
Matt McCormick
matt.mccormick at kitware.com
Sat Aug 29 17:44:51 EDT 2015
Hi Marcos,
If BUILD_EXAMPLES and BUILD_TESTING is turned on in your ITK CMake
configuration, and the ITKData target has been built, the example and
testing data are available in the build tree. Run
./bin/DicomSeriesReadPrintTag ./ExternalData/Testing/Data/Input/DicomSeries
and the tags will be printed out.
Hope this helps,
Matt
On Sat, Aug 29, 2015 at 4:51 PM, Marcos <fotosentido at gmail.com> wrote:
> 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.
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list