[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    Re: [vtkusers] Problems calling GetPixelValue
From:       "Randy Heiland" <heiland () ncsa ! uiuc ! edu>
Date:       2001-04-29 20:59:50
Message-ID: 1010429155950.ZM25001 () sangamon ! ncsa ! uiuc ! edu
[Download RAW message or body]

On Apr 29, 10:27am, Julian Humphries wrote:
> Subject: [vtkusers] Problems calling GetPixelValue
> Environment:
>
> Recent vtkNightly
> Python 1.5
> Win2k
>
> Trying to get scalar value for a pixel with call to
> vtkRenderWindow.GetPixelData():
>
> winRen.GetPixelValue(x,y,x,y,1)
>
> I am getting a NameAttribute error for GetPixelData.  This would seem to be
> a valid property for a vtkRenderWindow, any help on what I am doing
> wrong?  I can get other properties of the render window with no difficulty.
>

Julian,

I'm assuming you mistyped 'Value' instead of 'Data'.  There is no method
'GetPixelValue' - which would be reason enough for the NameAttrib error :)
 However, beyond that, I doubt that 'GetPixelData' is being wrapped either (it
didn't use to be) since it returns an 'unsigned char*', and methods returning
"complex" types are not typically wrapped.

If you're feeling up to it, you can download PyRenderWindow_GetPixelData.cxx
from http://www.ncsa.uiuc.edu/~heiland/vtk/ , insert it into the approp
/graphics/python routine and recompile/rebuild your graphics lib.

For more help on extending Python, rf:
http://www.python.org/doc/current/ext/callingPython.html

good luck,
--Randy


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic