streamlines and time information

Richard Strelitz strelitz at lanl.gov
Thu Jun 1 10:34:22 EDT 2000


The following code snippet might be intricate, but it does show the
path.  If anyone wants to make it more compact, elegant, or
abstruse, I would welcome the clarifications and amendments.
----------------------

vtkStreamPoints *pStream = vtkStreamPoints::New();
vtkStreamPoint *pStreamPoint;
vtkStreamArray *pStreamList;
flow Time, Distance;

//   create streamlines
pStream->SetSource(pSeeds);
pStream->SetInput(pData->GetOutput());
pStream->Update();

//  Now descend into the Stream structure
//       I'd include a "flow"chart if this were not e-mail
//
  pStreamList = pStream->GetStreamers;
  pStreamPoint=pStreamList->Array;
  NStreams = pStream->GetNumberOfStreamers();  //

//   Look at each streamer
  for(i=0;i<NStreams;i++){
     Npoints = pStreamList->GetNumberOfPoints();   // This streamer's size
    for (j=0;j<Npoints;j++)
     { Time = pStreamList->GetStreamPoint(j)->t;
        Distance = pStreamList->GetStreamPoint(j)->d;
        CellId = pStreamList->GetStreamPoint(j)->cellId;
        if(CellId >= 0.0)  {  we have valid point )
     } // end of j loop
  pStreamList++;     // go to next streamer
 }  //  end of streamer loop

-------------
Hope this helps.  This is just part of my current work.

Richard Strelitz, LANL-ACL Vis Team



Georg Kosakowski wrote:

> Hi,
> is there any possibility to extract the "time" information for streamlines?
> I would like to colour streamlines according to the (absolute or integrated)
> time a "particle" needs for travelling from the starting point (of the
> streamline) to a certain position.
> Thanks in advance, Georg
>
>  --
> --------------------------------------------------------------
>       Georg Kosakowski
>       Department of Environmental Sciences and Energy Research
>       The Weizmann Institute of Science
>       76100 Rehovot, Israel
>       phone: +972-8-9344226
>       fax:  +972-8-9344124
>       E-Mail: g.kosakowski at gmx.net
> --------------------------------------------------------------
> --------------------------------------------------------------------
> 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