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

xujf xujf at sjtu.edu.cn
Wed Apr 21 07:47:53 EDT 2004


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