[vtkusers] Problem VTK4 + python 2.2
Emmanuel Olart
olart at theralys.com
Mon Jan 14 05:29:23 EST 2002
Hi again
I though it worked but I just tried to redo the whole thing with RPMs
for Python 2.2 and wcPython, i then recompile VTK4 against these
versions and i then got back to the same problem ..
When i print the type of data , vtk answers vtkobject :
/Python 2.2 (#1, Dec 23 2001, 09:30:32) //
//[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2//
//Type "help", "copyright", "credits" or "license" for more information.//
//>>> from vtkpython import *//
//>>> data=vtkImageData()//
//>>> reslice=vtkImageReslice()//
//>>> reslice.SetInput(data)//
//Traceback (most recent call last)://
// File "<stdin>", line 1, in ?//
//ValueError: method requires a VTK object//
//>>> print type(data)//
//<type 'vtkobject'>//
/
I really can t understand this...
Regards Emmanuel
Jose Paulo Moitinho de Almeida wrote:
>Hello
>
>On a similar situation: <NEW> machine + python 2.2 + vtk4, I can reproduce
>exactly the same problem as Emmanuel. But the quick check that you mention
>results in a <type 'vtkobject'>.
>
>I discovered it because I had problems with mayavi in:
>
> def init_scalar_bar (self):
> "Sets up the default scalar bar."
> debug ("In LutHandler::init_scalar_bar ()")
> self.sc_bar = vtkpython.vtkScalarBarActor ()
> self.sc_bar.SetLookupTable (self.lut)
>
>I got in the SetLookupTable command a:
>"ValueError: method requires a VTK object (in init_scalar_bar)"
>
>Regards
>
>Ze Paulo
>
>On Saturday 12 January 2002 03:40, David Gobbi wrote:
>
>>Hi Emmanual,
>>
>>...
>>
>>At least for me, the VTK 4.X and python2.2 combination seems
>>to work fine. I built VTK with shared libraries.
>>
>>My suspicion is that if you do a "make clean" of VTK and rebuild,
>>then the problem will go away. Also make sure that CMakeCache.txt
>>is pointing to the correct set of header files for python2.2.
>>
>
>No other python installed.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020114/beb80b78/attachment.htm>
More information about the vtkusers
mailing list