[vtkusers] is it correct to use vtkProbeFilter to get the scalars value

Amy Henderson amy.henderson at kitware.com
Wed Apr 21 08:31:39 EDT 2004


Call probe.Update() before you try to access its output.

- Amy

At 07:47 AM 4/21/2004, xujf wrote:
>Hi,vtkusers:
>    In order to get the scalar value at a point (x,y,z),I use the class 
> vtkProbeFilter.
>my code as follows:
>
>minc = vtkMINCReader()
>minc.SetFileName("F:/brain.mnc")
>data=minc.GetOutput()                                 #data is vtkimagedata
>
>point=vtkPoints()
>point.InsertPoint(0,50,50,50)                         #here x=50,y=50,z=50
>pointug=vtkUnstructuredGrid()
>pointug.SetPoints(point)
>probe=vtkProbeFilter()
>probe.SetInput(pointug)
>probe.SetSource(data)
>print probe.GetOutput().GetPointData().GetScalars()  # print the scalars value
>
>but the printed result is always "None".
>I don\'t know whether I use these classes(especially 
>"vtkProbeFilter")correctly?
>
>Thanks in advance!
>xujf






More information about the vtkusers mailing list