[vtkusers] Rendering a z=f( x, y) 3D surface

David Gobbi david.gobbi at gmail.com
Wed Aug 3 12:12:32 EDT 2016


Hi Stéphane,

The class that generates a z=f(x,y) surface is the vtkWarpScalar class.
Basic usage is as follows:
1) create a 2D image where the pixel value is the elevation (i.e. the z
value)
2) turn this into a polydata with vtkImageDataGeometryFilter
3) use vtkWarpScalar to set the "z" value of each point to the pixel value

 - David

On Wed, Aug 3, 2016 at 9:54 AM, Stéphane ALBERT <otb.salbert at gmail.com>
wrote:

> Hello,
>
> I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y
> ) 3D surface using the VTK in a Qt main-window.
>
> The goal of the mock-up is to test the load for large data such as, for
> example, 32000x32000 discretization of the x and y axes.
>
> I made a QMainWidow using a QVTKWidget and displaying a sphere (taken from
> the Examples section).
>
> I understood the general pipeline layout (similar to ITK) but I don't know
> which VTK classes I should use/derive to modelize my z = f( x, y ) function
> and render it.
>
> Should I :
>
>    - derive from vtkPolyDataAlgorithm and implement a point generation
>    algorithm ;
>    - fill in some vtkImageData ;
>    - implement some filter taking grid data ;
>    - other?
>
> Basically, the user input the size (e.g. 32000), the software generates
> and render the data.
>
> As an option, I would like to add some controls to dynamically
> increase/decrease the size parameter.
>
> In a second step, we would like to test some adaptative rendering
> algorithms the fast render the large number of vertices. Does VTK provide
> such algorithms? How could I implement and insert one into the VTK pipeline
> ?
> Best regards,
>
> http://orfeo-toolbox.org
>
> Stéphane ALBERT
> Ingénieur d'études et développement
> Business Unit E-SPACE & Geo Information, Département APPLICATIONS
>
> CS Systèmes d'Information
> Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
> 31506 Toulouse Cedex 05 - France
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160803/cf4393dc/attachment.html>


More information about the vtkusers mailing list