-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numpy -> VTK conversion #7
Comments
Yes this is a wrapper to get the output of the WS3DINV into something useable for visualization which turns out to be Paraview. There is a module called evtk that is another wrapper from numpy arrays into vtk formats. I have only got this package to compile properly under linux, it compiles under windows but has a bug in making 3D points. But it is very handy. I'm sure with more work we wouldn't need the evtk module just the vtk library which is pretty standard library in Python. In the mean time, it should be left as a stand alone file until we can find an easy way to incoorporate into WS3DTools with relative ease removing the dependence on evtk package. Again the only problem is the evtk package that is not standard. |
Ok, worked with PyVTK today. It's a small extra package, and I am not sure, if contained in standard distributions. However, it's far simpler than the original vtk module and it seems to work ok, even for non-regular (rectilinear though) grids: def f(x,y,z): from numpy import * vtk_object = VtkData(RectilinearGrid(arange(30)/2.-10,sin(pi_arange(40)/39.)_40,arange(60))) I could read and visualise this file with paraview without problems. I check out 'UnstructuredGrid' tomorrow |
Stephan mentioned, there is some conversion from Numpy into VTK for the paraview visualisation around? Is it the wsmt_pv (thus specifically for th ws output)?
A generalised version would be a good thing to have in 'utils'. I start trying to browse through it today and see, if I get an idea.
The text was updated successfully, but these errors were encountered: