![]() # draw first the grid and then the lines. Here is an edited version of your script: from vtk import (vtkUnstructuredGridReader, vtkDataSetMapper, vtkActor,Īrray = c2p.GetOutput().GetPointData().GetArray(0)Ĭontours.GenerateValues(10,vrange,vrange) To make things more visible I would also suggest to place the contour line actor after the grid. Now the fitler should work as you expect. For the latter you can do: contours.GenerateValues(10,vrange,vrange) The contour filter needs some field defined over your data (such as temperature or pressure) to extract the surface where that is equal to some value. So you need to either pick a value in this range or automatically generate few in the range. The selected array (first in your dataset) however has values only in the range: array = c2p.GetOutput().GetPointData().GetArray(0) This means that you want a contour line at value 9. Since you are using SetInputData/ GetOutput API you need to call c2p.Update() before calling c2p.GetOutput() # c2p.GetOutput() is empty ! To validate : call print(c2p.GetOutput().GetNumberOfPoints()) There are only two minor issues with your script. Interactor.SetRenderWindow(renderer_window)įor someone new to VTK this is very good ! # Create the RendererWindowInteractor and display the vtk_file ![]() Renderer.SetBackground(1, 1, 1) # Set background to white ![]() Gridactor.GetProperty().EdgeVisibilityOn() Mapper.SetInputConnection(contours.GetOutputPort()) #gridmapper.GetInput().GetCellData().SetActiveScalars("A") VtkRenderer, vtkRenderWindow, vtkRenderWindowInteractor, vtkContourFilter) I need help pls from vtk import (vtkUnstructuredGridReader, vtkDataSetMapper, vtkActor, I can’t upload an image (I am a new user here). Download the 2007-12 survey shapefiles for Lake Arlington. I opened them in Paraview and I am facing the following issues: I want to extract the Mach Number at selected coordinates but I am only able to extract in terms of Point ID when I open the spreadsheet view. Get the data Texas Water Development Board provides the shapefiles for completed lake surveys. Hi, I am new in VTK, and I have a vtk UnstructuredGridFile and I read it, but it show me with polygons and I need to deploy it as isosurface. Masking no-data values from a raster layer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |