[ITK] [ITK-users] ImageIOFactory problem

Soren Christensen sorench at gmail.com
Mon Sep 28 16:31:06 EDT 2015


Of course - sending it to your email in a second.
Thanks!

On Mon, Sep 28, 2015 at 1:22 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> Strange, can you share the file?
>
> On Mon, Sep 28, 2015 at 4:04 PM, Soren Christensen <sorench at gmail.com>
> wrote:
>
>> Thanks again!
>> I used std:cout << "Could not CreateImageIO for: " << "|" <<
>> fn.toStdString().c_str() << "|" << std::endl;
>> and get:
>>
>> Could not CreateImageIO for: |/home/sorenc/test/itk1_014_000.mhd|
>>
>> This is a direct copy paste and you will see there is no leading or
>> trailing characters there.
>>
>> itksnap /home/sorenc/test/itk1_014_000.mhd
>> shows the file.
>>
>> Any ideas appreciated!
>> Thanks,
>> Soren
>>
>>
>> On Mon, Sep 28, 2015 at 11:33 AM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>>
>>> Can you change your output to:
>>>
>>> std::cerr << "Could not CreateImageIO for: " << "|" << fn.toStdString().c_str() << "|" << std::endl;
>>>
>>>
>>> Perhaps there is a leading or trailing space in the filename?
>>>
>>>
>>> On Mon, Sep 28, 2015 at 2:27 PM, Soren Christensen <sorench at gmail.com>
>>> wrote:
>>>
>>>> Hi Matt,
>>>>  Thanks for the reply!
>>>> Yes MetaImageIO seems to be on the list third-last below.
>>>> Let me know what I can do to trouble shoot!
>>>>
>>>> Thanks!
>>>> Soren
>>>>
>>>>
>>>> NiftiImageIO (0x2892ed0)
>>>> NrrdImageIO (0x2893420)
>>>> GiplImageIO (0x2893e70)
>>>> HDF5ImageIO (0x28944c0)
>>>> JPEGImageIO (0x28946c0)
>>>> GDCMImageIO (0x2894bc0)
>>>> BMPImageIO (0x2894f90)
>>>> LSMImageIO (0x2895840)
>>>> PNGImageIO (0x2895ed0)
>>>> TIFFImageIO (0x28961b0)
>>>> VTKImageIO (0x2896740)
>>>> StimulateImageIO (0x2896ac0)
>>>> BioRadImageIO (0x28970c0)
>>>> MetaImageIO (0x2897490)
>>>> MRCImageIO (0x28984c0)
>>>> MINCImageIO (0x28988f0)
>>>>
>>>> On Sun, Sep 27, 2015 at 12:46 PM, Matt McCormick <
>>>> matt.mccormick at kitware.com> wrote:
>>>>
>>>>> 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
>>>>> >
>>>>>
>>>>
>>>>
>>>> _____________________________________
>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>>>
>>
>>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150928/d42ae288/attachment.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