[vtkusers] vtkStreamTracer on Unstructured Cell Based Data

Trinian Gordon trinian.gordon at outlook.com
Fri Jan 11 19:20:05 EST 2019


Here's a possible solution:

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

Regards,
Trinian

________________________________
From: vtkusers <vtkusers-bounces at vtk.org> on behalf of Trinian Gordon <trinian.gordon at outlook.com>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190112/620ea305/attachment.html>


More information about the vtkusers mailing list