Re: vtkStreamTracer on Unstructured Cell Based Data

Trinian Gordon <[email protected]> Sat, 12 Jan 2019 00:20:05 +0000
Newsgroups gmane.comp.lib.vtk.user
Message-ID <MWHPR07MB3183F9D9F0BB906ED312D9CA8A860@MWHPR07MB3183.namprd07.prod.outlook.com>
Here's a possible solution:

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

Regards,
Trinian

________________________________
From: vtkusers <[email protected]> on behalf of Trinian Gordon <[email protected]>
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