[Insight-developers] Could not create IO object for file cthead1.png
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Tue Mar 15 11:07:13 EDT 2011
I forgot to say that setting the ImageIO by hand works:
1> import itk
2> reader = itk.ImageFileReader.IUC3.New(FileName="/home/glehmann/src/
ITK/Wrapping/WrapITK/images/cthead1.png")
3> reader()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/glehmann/src/ITK/build/<ipython console> in <module>()
/home/glehmann/src/ITK/build/lib/ITKCommonBasePython.py in
__call__(self, *args, **kargs)
2452 import itk
2453 itk.set_inputs( self, args, kargs )
-> 2454 self.UpdateLargestPossibleRegion()
2455 return self
2456
RuntimeError: /home/glehmann/src/ITK/ITK/IO/Base/include/
itkImageFileReader.txx:144:
Could not create IO object for file /home/glehmann/src/ITK/Wrapping/
WrapITK/images/cthead1.png
Tried to create one of the following:
You probably failed to set a file suffix, or
set the suffix to an unsupported type.
4> pngio = itk.PNGImageIO.New()
5> reader.SetImageIO(pngio)
6> reader()
6> <itkImageFileReaderPython.itkImageFileReaderIUC3; proxy of <Swig
Object of type 'itkImageFileReaderIUC3 *' at 0x1fdbba0> >
7> itk.size(reader)
7> itkSize3([256, 256, 1])
Le 15 mars 11 à 15:55, Gaëtan Lehmann a écrit :
>
> Hi,
>
> I've mostly fixed the build of wrappers with the modularized ITK,
> but the tests are all broken because of that problem:
>
> RuntimeError: /home/glehmann/src/ITK/ITK/IO/Base/include/
> itkImageFileReader.txx:144:
> Could not create IO object for file /home/glehmann/src/ITK/Wrapping/
> WrapITK/images/cthead1.png
> Tried to create one of the following:
> You probably failed to set a file suffix, or
> set the suffix to an unsupported type.
>
> or the similar problem for the writer:
>
> RuntimeError: /home/glehmann/src/ITK/ITK/IO/Base/include/
> itkImageFileWriter.txx:157:
> Could not create IO object for file CastImageFilter.png
> Tried to create one of the following:
> You probably failed to set a file suffix, or
> set the suffix to an unsupported type.
>
>
> It seems that the ImageIO are not registered.
>
> Any idea of what can lead to this behavior?
>
> Thanks,
>
> Gaëtan
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr http://www.itk.org
> http://www.mandriva.org http://www.bepo.fr
>
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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://www.itk.org/mailman/listinfo/insight-developers
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr http://www.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110315/d4e96485/attachment.pgp>
More information about the Insight-developers
mailing list