[vtkusers] Contours elevation

Cory Quammen cquammen at cs.unc.edu
Fri Feb 22 09:51:17 EST 2008


Martin,

You can first create a height field from your data using the
vtkWarpScalar filter. Then, you can create contours on the warped data
coming from this filter, and they will be at their respective heights.
Your pipeline will look something like (in Python):

warper = vtkWarpScalar()
warper.SetInputConnection(your_data_source.GetOutputPort())
warper.SetScaleFactor(1.0)

contourer = vtkContourFilter()
contourer.SetInputConnection(warper.GetOutputPort())
contourer.GenerateValues(3, 0, 10) # number of contours, min value, max value

Hope that helps,
Cory

On Fri, Feb 22, 2008 at 9:03 AM, Martin Saturka <kvutza at gmail.com> wrote:
> Dear Sirs,
>  is there a transform filter to use for setting contour lines to their
>  respective heights?
>  I have found a similar question on surface reconstruction, but it
>  produces whole surfaces.
>  http://public.kitware.com/pipermail/vtkusers/2007-December/093766.html
>
>  May be, it is a wrong way to do it through 2d contours, starting with
>  a user function.
>
>  Thanks
>  Martin
>  _______________________________________________
>  This is the private VTK discussion list.
>  Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>  Follow this link to subscribe/unsubscribe:
>  http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen



More information about the vtkusers mailing list