[ITK-users] ImageIOFactory problem
Soren Christensen
sorench at gmail.com
Sun Sep 27 15:06:37 EDT 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150927/1167d6f6/attachment.html>
More information about the Insight-users
mailing list