vtkStreamTracer on Unstructured Cell Based Data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkStreamTracer on Unstructured Cell Based Data

Trinian Gordon
Hello,

Starting from an unstructured grid, I have a cell based vector parameter which I would like to use to generate streamlines. When I load the data into Paraview, I am able to generate valid streamlines, but when I try and use the vtkStreamTracer to generate streamlines in my own application, it appears to only work if the vector data is set on the point data instead of cell data.

  • Unstructured Grid -> getCellData()->SetVector -> vtkStreamTracer fails because the point data doesn't have vector data.
  • Unstructured Grid -> getCellData()->SetVector -> vtkCellDataToPointData -> vtkStreamTracer fails because the tracer needs cells which no longer exist.
  • I can create an unstructured grid with only points located at the cell centers and set the vector on the point data, but it fails because the tracer needs cells which don't exist.

Any ideas for generating streamlines based on a cell based vector property?

Thanks,
Trinian

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkStreamTracer on Unstructured Cell Based Data

Trinian Gordon
Here's a possible solution:

unStructuredGrid->GetCellData()->SetVectors(vectorsForCells);
vtkCellDataToPointData->SetInputData(unStructuredGrid);
vtkCellDataToPointData->PassCellDataOn();
vtkStreamTracer->SetInputConnection(vtkCellDataToPointData->GetOutputPort();

Regards,
Trinian


From: vtkusers <[hidden email]> on behalf of Trinian Gordon <[hidden email]>
Sent: January 11, 2019 1:09 PM
To: VTK Users Mailing List
Subject: [vtkusers] vtkStreamTracer on Unstructured Cell Based Data
 
Hello,

Starting from an unstructured grid, I have a cell based vector parameter which I would like to use to generate streamlines. When I load the data into Paraview, I am able to generate valid streamlines, but when I try and use the vtkStreamTracer to generate streamlines in my own application, it appears to only work if the vector data is set on the point data instead of cell data.

  • Unstructured Grid -> getCellData()->SetVector -> vtkStreamTracer fails because the point data doesn't have vector data.
  • Unstructured Grid -> getCellData()->SetVector -> vtkCellDataToPointData -> vtkStreamTracer fails because the tracer needs cells which no longer exist.
  • I can create an unstructured grid with only points located at the cell centers and set the vector on the point data, but it fails because the tracer needs cells which don't exist.

Any ideas for generating streamlines based on a cell based vector property?

Thanks,
Trinian

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers