[vtkusers] Help with vtkDoubleArray and vtkWarpScalar

Janny Dong janny.dong at gmail.com
Wed May 16 12:50:23 EDT 2007


Thanks for your hint and code! Is ParaView easy to use? I have no experience
with it so far. By the way, I am using Visual Studio 2005.

On 5/15/07, fred <fredmfp at gmail.com> wrote:
>
> Janny Dong a écrit :
> > Hi, all
> >
> > I have the data points like (X,Y,Z). (X,Y) is the position of the data
> > points on the map. Z is the height that I am trying to represent with
> > colors.
> >
> > For example, the data are like
> >
> > {0,0,60.3}, {0,1, 60.2},{0,2,60.1},{0,3,60.0},
> > {1,0,59.9},{1,1,59.8}, {1,2,59.7},{1,3,59.6},
> > {2,0,59.6}, {2,1,59.5},{2,2,59.3},{2,3,59.5},
> > {3,0,59.6}, {3,1,59.7}, {3,2,59.9}, {3,3,60.1}
> >
> >  I tried to put my data in vtkDoubleArray and then create
> > vtkImageData. Then I used vtkWarpScalar to get a 3D colored surface.
> > Basically I'd like to generate a surface as MATLAB functions surf()
> > and meshgrid() do. I must have done something wrong in this procedure
> > since I got nothing in the rendering window.
> >
> > Is there any sample code for this? Or is there any better way to
> > generate a color map out of such kind of data?
> >
> The short code attached should do the trick.
> Then use your favorite 3D viz'.
> With paraview, you should get what you want using ExtractSurface then
> Warp (scalar) filters.
>
>
> HTH.
>
> --
> http://scipy.org/FredericPetit
>
>
> _______________________________________________
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070516/54e7aaf1/attachment.htm>


More information about the vtkusers mailing list