[Paraview] Python API problem
Sebastien Jourdain
sebastien.jourdain at kitware.com
Thu Apr 11 17:53:44 EDT 2013
You need to update your ParaView to ParaView/master. The version that you
have has some python wrapping issue.
Seb
On Thu, Apr 11, 2013 at 5:22 PM, Zach Mullen <zach.mullen at kitware.com>wrote:
> Hi guys,
>
> I'm writing a ParaViewWeb application in python and I'm running into
> trouble. I load the data source, which is a volume image (.mha) as follows:
>
> srcObj = simple.OpenDataFile(fullpath)
> simple.SetActiveSource(srcObj)
> rep = simple.Show()
>
> I have managed to get the bounds and color array name information, but for
> some reason I can't get to the Range information. The way I'm trying is:
>
> imageData = srcObj.GetPointDataInformation().GetArray(0)
> scalarRange = imageData.GetRange()
>
>
> I get an error saying GetComponentRange() function does not exist, and
> indeed when I get the instance of the underlying vtkPVArrayInformation,
> that function is not there in python, so I'm not sure how to get the range.
> I looked at the C++ header for vtkPVArrayInformation, and the
> GetComponentRange is there, but it isn't available on that python object
> exposed to me, even though SetComponentRange is present.
>
> This is on current master branch of ParaView built with python wrapping.
> When I run the same code in v3.98 in the GUI with python shell, it works
> fine and I get back the range for the image. If there is some better way
> to get the range, please let me know. In older versions of the script I
> just used simple.GetDataInformation(), but it looks like that function has
> gone away.
>
> Thanks,
>
>
> --
> Zach Mullen
> R & D Engineer
> Kitware Inc.
> 919-869-8858
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130411/fc38c490/attachment.htm>
More information about the ParaView
mailing list