[Paraview] vtkImageReader2Factory.CreateImageReader2 returning null
Rodrigo Pelorosso
rodrigo.pelorosso at gmail.com
Fri Jul 29 08:49:00 EDT 2016
Hello!
I'm trying to read a jpeg file using python to use in a plane as a texture,
I have this:
from paraview.vtk.vtkIOImage import vtkImageReader2Factory
reader =
vtkImageReader2Factory.CreateImageReader2("/home/silencer/example.jpg")
This doesn't display any errors when executing from the paraview python
console, but when displaying reader (by entering "reader" in the console)
it displays nothing so I guess it's null. I've made sure the jpg file is in
that path.
According to the documentation (
http://www.vtk.org/doc/nightly/html/classvtkImageReader2Factory.html) If no
reader is found, null is returned. I guess that's what's happening?
I've tried using
from paraview.vtk.vtkIOImage import vtkJPEGReader
but it was a shot in the dark. It didn't work, anyway :(
Do you know what could be happening?
thank you!
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160729/b1fe4210/attachment.html>
More information about the ParaView
mailing list