Querying the scalar value at a point

David J. Netherway dnetherway at health.adelaide.edu.au
Tue Feb 22 21:05:28 EST 2000


Hello,

I have been trying to get the interpolated scalar value at an internal
point of a medical data volume
with scalars in the range 0-4095.

I have tried to use a point to probe the data as follows:

vtkImageReader reader
   reader attributes etc

  vtkPoints point
    point Allocate 1 1
    point SetPoint 0 $x $y $z
  vtkUnstructuredGrid pointUG
    pointUG SetPoints point
  vtkProbeFilter probe
    probe SetInput pointUG
    probe SetSource [reader GetOutput]
#  [[probe GetPointData] GetScalars] GetScalar 0
#  the above line does not work: probe has no method GetPointData

I also tried a structuredPoints approach

  vtkStructuredPoints pointSP
    pointSP SetOrigin $x $y $z
    pointSP SetDimensions 1 1 1
  vtkProbeFilter probe
    probe SetInput pointSP
    probe SetSource [reader GetOutput]

but still could not find a way query the probe position.

I also tried to reslice at single point and failed.

I was following the ViewerApp.tcl example at one stage.
It gives a point that is not an interpolated poiint and I think only
works if the data
range is less that 255 (I am not sure about this latter point).

In one variation a line similar to the following indicated that the
datatype was incorrect.
   [probe GetOutput] GetScalarComponentAsFloat $x $y $z 0


Would someone please give me a pipeline that works for a basic problem
that should be (and I
expect is) quite simple.

Thanks, David Netherway


--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list