In file2.vtk, each line has one coordinate (x1 y1 z1), see below: # vtk DataFile Version 2.0īut in file2_resample.vtk, each line has three coordinates (x1 y1 z1 x2 y2 z2 x3 圓 z3). Now my question is the new file2_resample.vtk has different format with file2.vtk. Please let me know if my above steps have any problem. The VTK has this format: ASCII DATASET UNSTRUCTUREDGRID POINTS 132651 double -100.0 -100.0 -100.0 -100. I can visualize the vector field using Glyphs but the problem is that Streamtracer doesn’t show anything. I also upload the state file for your reference. Hi, I have a VTK with only Point Data and Vector data and I would like to generate StreamLines following the Vector Field. Generic Warning: In C:VTK-9.0.2RenderingOpenGL2vtkOpenGLPolyDataMapper.cxx, line 263 vtkOpenGLPolyDataMapper::SetVertexShaderCode was deprecated for VTK 9.0 and will be removed in a future version. (3) read file2.vtk → Resample with Dataset, choose file2.vtk as “Source” and TableToPoints1 as “Destination mesh” → tick the “Pass Point Array” and “Pass Field Array”Īfter above four steps, the dataset in file2_resample.vtk has the same coordinates of points as that in file1.vtk. Use vtkOpenGLShaderProperty::GetVertexShaderCode instead. (2) read pointTBL.csv → Table To Points filter Read file1.vtk → open a new spreadsheet view (showing coordinates of points and other values) → Export Spreadsheet as pointTBL.csv import vtk from numpy import random class VtkPointCloud: def init (self, zMin-10.0, zMax10.0, maxNumPoints1e6): self.maxNumPoints maxNumPoints self.vtkPolyData vtk.vtkPolyData () self. (1) determine the coordinates of points in file1.vtk Here is an example that sets the point color based on z-axis value. Now I’d like to resample the vorticity-z value (scalar) of file2.vtk into the point cloud of file1.vtk, so I use the following steps: Hi thanks for your detailed reply! I find the Resample with Dataset filter seems to be more appropriate for my case.įor example, I have two vtk files with different coordinates of points:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |