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

Marcos fotosentido at gmail.com
Sat Aug 29 18:40:46 EDT 2015


Hi,

I did that, but it gives me the error:

itk::ExceptionObject <...>
Location: "void __thiscall itk::ImageSeriesReader<class
itk::Image<short,3>::GenerateOutputInformation(void)"
File ...ImageSeriesReader.hxx: Line 122
At least one filename is required.

Instead of ./ExternalData/Testing/Data/Input/DicomSeries (which is a
directory), I've tried a dcm file, for example. The error is the same.

I'm on Windows, so I did on cmd:


C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe
/ExternalData/Testing/Data/Input/DicomSeries

And also:
C:\ITK-4.8.0-build> bin\Debug\DicomSeriesReadPrintTags.exe C:\myfile.dcm




2015-08-29 23:44 GMT+02:00 Matt McCormick <matt.mccormick at kitware.com>:

> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150830/3ce8031e/attachment-0001.html>
-------------- next part --------------
_____________________________________
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