[Paraview] Question about modify data in VTK files

Li, Teng tengli2 at illinois.edu
Sat Oct 7 00:04:01 EDT 2017


Hi Utkarsh,

Thanks! I will try to use Python instead of Matlab.

Best,
Teng


Teng Li

Master Candidate in Structures

Department of Civil and Environmental Engineering

University of Illinois at Urbana-Champaign

205 North Mathews Ave, Urbana, IL. 61801

Phone:(217)8196210, Email: tengli2 at illinois.edu



________________________________
From: Utkarsh Ayachit [utkarsh.ayachit at kitware.com]
Sent: Friday, October 06, 2017 8:18 PM
To: Li, Teng
Cc: paraview at paraview.org
Subject: Re: [Paraview] Question about modify data in VTK files

You can do similar things simply using Python and numpy, instead of matlab. Numpy is included in the Python distributed with ParaView, so you can use it in pvpython or Python shell in the GUI to open csv [1] and process it add appropriate before saving out.


[1] https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.loadtxt.html

On Wed, Oct 4, 2017 at 11:45 PM, Li, Teng <tengli2 at illinois.edu<mailto:tengli2 at illinois.edu>> wrote:
Hi,

I have a question about modify the data in vtk files and then visualize them again in Paraview.

First, I have 118 vtk files which record the information of each time step. In order to process some data in my vtk files, I plan to store them as .CSV files. I saved them as points data files. However, I find that I need to save 118 CSV files and then process the data in each of them. And then I need to visualize each of them.

Because in every time step, I use the same method to modify specific data. I wonder is there a way that I can process all the data just one time so these specific data in every time step will be changed in the same way.

I know calculator works for some simple applications, such as add, minus. However, I might use some if else loops to modify the data. So I need to import the .CSV data into the Matlab to process them. And then import the modified .CSV files into Paraview to visualize the information.

Thanks!

Best,
Teng



Teng Li

Master Candidate in Structures

Department of Civil and Environmental Engineering

University of Illinois at Urbana-Champaign

205 North Mathews Ave, Urbana, IL. 61801

Phone:(217)8196210<tel:(217)%20819-6210>, Email: tengli2 at illinois.edu<mailto:tengli2 at illinois.edu>



_______________________________________________
Powered by www.kitware.com<http://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/20171007/91b8f619/attachment.html>


More information about the ParaView mailing list