[Paraview] [EXTERNAL] Plotting data to an existing model's surface
David E DeMarle
dave.demarle at kitware.com
Fri Jan 23 16:24:56 EST 2015
After you
1) get the list of points and values in the csv file:
x,y,z,val1,val2,…
2) read into paraview and converted from a table to a vtkpointset as Alan
suggested
3) try the vtkSurfaceReconstruction filter to convert it into a mesh.
That isn't exposed in ParaView (maybe not parallel aware) so use this
python programmable filter to do use it:
import vtk
pdi = self.GetPolyDataInput()
subf1 = vtk.vtkSurfaceReconstructionFilter()
subf1.SetInputData(pdi)
subf2 = vtk.vtkContourFilter()
subf2.SetInputConnection(subf1.GetOutputPort())
subf2.SetValue(0, 0.0)
subf2.Update()
pdo = self.GetPolyDataOutput()
pdo.ShallowCopy(subf2.GetOutput())
ParaView will then happily interpolate values across the faces of the mesh
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Fri, Jan 23, 2015 at 3:51 PM, Scott, W Alan <wascott at sandia.gov> wrote:
> Mark,
>
> I don’t know the answer to your question, but a few years ago I wrote a
> wiki page on converting .csv file data into points and structured grids.
> The write-up is here: http://www.paraview.org/Wiki/Data_formats. Hope
> that helps.
>
>
>
> Alan
>
>
>
> *From:* ParaView [mailto:paraview-bounces at paraview.org] *On Behalf Of *Mark
> Belan
> *Sent:* Thursday, January 22, 2015 9:50 AM
> *To:* paraview at paraview.org
> *Subject:* [EXTERNAL] [Paraview] Plotting data to an existing model's
> surface
>
>
>
> Hello all,
>
> I'm a graduate student in geology trying to do some visual data work, but
> I'm afraid my inexperience with paraview is making things a bit difficult
> for me.
>
> Essentially what I'm trying to create is a 3D model of a rock that has its
> surface coloured to show spatial distribution of a physical property
> associated with certain areas on the rock.
>
> I was able to reproduce the rock I sample from using a 3D scanner but I
> have no idea how to go about selecting particular areas of the rock's
> surface, assigning a value to that "area", and having the program
> interpolate between multiple "areas". Essentially I'd like this to produce
> a color gradient showcasing the changing values.
>
> Can anyone offer some guidance/direction? I had someone at my campus
> suggest creating a .csv file with x,y,z coordinates of the particular areas
> of the model of interest, but after doing that all I've produced are
> "points"...not sure how to specify the association to the model and color
> and interpolation, etc.
>
> Thanks for any help,
>
> - Mark
> --
>
> *Mark Belan*, B. Art Sc.
> *M. Sc. Candidate - Astrobiology*
>
> *Lewis and Ruth Sherman Graduate Fellow*
>
> McMaster University
>
> School of Geography and Earth Sciences
>
> GSB 323
> 1280 Main Street West
> Hamilton, Ontario
> Canada
> L8S 4L8
>
> *Art*: www.markbelan.com
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150123/82036bac/attachment-0001.html>
More information about the ParaView
mailing list