Q: How to access the generated points/cells/coordinates of a vtkStreamLine?

Richard Strelitz strelitz at lanl.gov
Thu Mar 30 01:27:04 EST 2000


Mirco,
  I have faced the same situation.  Here is my solution, more annotated
than
anything else.

vtkStreamPoints *pStream = vtkStreamPoints::New();
   //  create streamlines
  pStream->SetSource(pSeeds);   //  pSeeds is a vtkPolyData object

// Create output objects for handling Streamline data

vtkStreamPoint *pStreamPoint;
vtkStreamArray *pStreamList;
 float* pPointLoc = new float[3];
 pStreamList = pStream->GetStreamers();
 pStreamPoint = pStreamList->Array;
 NStreams = pStream->GetNumberOfStreamers();   // The number of streamlines
created

for(iStreams=0; iStreams < NStreams; Istreams++){
  Npoints = pStreamList->GetNumberOfPoints();   // This streamline has
Npoints in it
  for(i=0; i< Npoints; i++)
   {  CelliD       = pStreamList->GetStreamPoint(i)->cellid;
      pPointLoc = pStreamList->GetStreamPoint(i)->x;
    //  works the same for all members of vtkStreamPoint
   //   invalid points (outside of domain of Velocity) are denoted by
CelliD < 0;
   }
  pStreamList++;   //  Get the next streamline
 }  // end of iStreams loop

------------------------
 I hope that makes you current and helps streamline your coding.
Sorry, I don't have a flowchart for this.

Richard Strelitz, SciVis staff
  ACL-LANL


Mirco Müller wrote:

> Greetings list!
>
>     Is there any way to easily access the points/cells/coordinates,
> which have been generated by a vtkStreamLine? Getting the corresponding
> scalar value of a certain point/cell would be great too.
>
> Thanks in advance for your time and kind advice!
>
> Best regards...
>
> Mirco
>
> --------------------------------------------------------------------
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at public.kitware.com>. For help, send message body containing
> "info vtkusers" to the same address.
> --------------------------------------------------------------------

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list