[ITK-users] ImageIOFactory problem

Matt McCormick matt.mccormick at kitware.com
Sun Sep 27 15:46:44 EDT 2015


Hi Soren,

When the registered IO's are printed, do they include MetaIO?

Thanks,
Matt

On Sun, Sep 27, 2015 at 3:06 PM, Soren Christensen <sorench at gmail.com> wrote:
> Hi,
>
>  I gave problems getting  ImageIOFactory to return a valid pointer.
>
>
> I am trying this:
>
>
>     itk::ImageIOBase::Pointer imageIO =
>
>             itk::ImageIOFactory::CreateImageIO(
>
>                testfile, itk::ImageIOFactory::ReadMode);
>
>
>     if( !imageIO )
>
>     {
>
>         std::cerr << "Could not CreateImageIO for: " <<
> fn.toStdString().c_str() << std::endl;
>
>         return 1;
>
>     }
>
>
>
> I get:
>
>  Could not CreateImageIO for:  /tmp/itk1_014_000.mhd
>
>
> I can open this file with ITK snap without issues.
>
>
> When I do this:
>
>
>     RegisteredObjectsContainerType registeredIOs =
>
>       itk::ObjectFactoryBase::CreateAllInstance( "itkImageIOBase" );
>
>               << registeredIOs.size()
>
>               << " IO objects available to the ImageFileReader.\n" <<
> std::endl;
>
>
> I get:
>
> 16 IO objects available to the ImageFileReader.
>
>
> I build with Qt/CMake
>
>
> So what am I missing here?
>
> Thanks in advance!
>
> Soren
>
>
>
>
>
>
> _____________________________________
> 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 Insight-users mailing list