[vtkusers] how to probe image gradient?

Dean Inglis dean.inglis at camris.ca
Thu Aug 24 11:47:37 EDT 2006


Hi,
I am trying to visualize in 3D the 2D gradient vector field
of a 2D image with the following pipeline:

1. vtkImageData (2D) 
2. vtkImageGradient (2D) 
3. vtkImagePad (add 0 for 3D vector )
4. vtkPolyData (3D spline but on 2D image plane) 
5. vtkProbeFilter
6. vtkArrowSource
7. vtkGlyph3D

pipeline is 
  1.->2.->3.->
              |->5.-> 
          4.->       |->7.
                 6.->


I seem to be missing something here because
the arrow glyphs at the end of the pipeline
are not showing up "oriented" as expected.
I know vtkProbeFilter will work on 2D images
with one component (e.g., VTK/Examples/GUI/Tcl/ProbeWithSplineWidget.tcl).
Can anyone suggest a filter/pipeline that will
switch scalar field data to vectors?
I tried the following between 3. and 4. 
3b. vtkImageToStructuredPoints
3c. vtkMaskFields
with 2. set to HandleBoundariesOff, but
this causes a pipeline error with the extents
being incorrectly set.

thanks,
Dean
 



More information about the vtkusers mailing list