[vtkusers] UnstructuredGrid to Graph
ndfabia at sandia.gov
Tue Jun 1 20:14:13 EDT 2010
It looks to me like the loop where you iterate over points and GetConnectedVertices() is where it's most expensive. You can replace that behavior with the vtkUnstructuredGrid::GetCells().
Iterating over that vtkCellArray and iterating over the pts returned from GetCell() may be faster. You'll need to build a switch around cell type to understand what that connectivity is, but I think after removing GetConnectedVertices(), the code size won't change too much...
On 5/21/10 7:35 AM, "David Doria" <daviddoria+vtk at gmail.com> wrote:
I am trying to convert all of the edges in an vtkUnstructuredGrid to a vtkGraph.
Here is what I have come up with:
It seems to be horribly slow. Can anyone recommend a faster way to do this?
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers