[vtkusers] Does vtk StreamLine/StreamTracer dislike vtkVoxel's?

Berk Geveci berk.geveci at gmail.com
Tue Jul 26 10:13:06 EDT 2005


Streamline should work fine with voxels. Can you post your data?

On 7/19/05, Peter Schmitt <pschmitt at gmail.com> wrote:
> Hey vtkusers,
> 
> I have an unstructured grid consisting of many adjacent vtkVoxels
> (cubes) with 8 vertices with one scalar and one vector corresponding
> to every vertex.
> 
> In both Paraview and a custom VTK app, I can visualize a vectorfield.
>  Here's a snapshot of a sampling of the vectors:
> http://www-unix.mcs.anl.gov/~pschmitt/reynolds400-steadygeom-pulseinflow0.5/images/reynolds-vectors.jpg
> 
> However, I am having problems getting streamlines working in both
> paraview and a custom vtk app:  vtkStreamTracer and vtkStreamLine
> create no streamlines whatsoever.
> 
> I can compile my code without errors or warnings, but no streamlines
> are displayed to the screen.  On execution, I get the following
> warning:
> Warning: In /software/linux-sles8-ia32/vizdev/vtk-nvgl-mpi-4.4.2-gcc-r1/src/Graphics/vtkRibbonFilter.cxx,
> line 93
> vtkRibbonFilter (0x8112c28):  No input data!
> 
> I  have tried variations of all the vtkStreamTracer and vtkStreamLine
> examples and tests (sometimes using vtkRibbonFilter and sometimes
> vtkTubeFilter), but the same thing happens:  no streamlines!  The
> program loads up very quickly (as in it doesn't seem to be doing much
> computation as I would expect to create streamlines).  Am I having
> difficulties because I store my data as voxels of an unstructured
> grid?  (I don't think so since the vtkStream* classes take vtkDataSet
> as input).
> 
> //start snip
>    vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New()
>    //load data into vtkUnstrucutredGrid...
> 
>    vtkRungeKutta4* integ = vtkRungeKutta4::New();
> 
>     vtkPointSource* seeds = vtkPointSource::New();
>     seeds->SetRadius(1.0);
>     seeds->SetCenter(140.784, 57.6672, -2.98392);  //note: this point
> is in my dataset!
>     seeds->SetNumberOfPoints(10);
> 
>     vtkStreamTracer* streamer = vtkStreamTracer::New();
>     streamer->SetInput(ugrid);
>     streamer->SetSource(seeds->GetOutput());
>     streamer->SetMaximumPropagation(0, 9E8);
>     //streamer->SetMaximumPropagation(1, 9E8);
>     streamer->SetMinimumIntegrationStep(1, 0.1);
>     streamer->SetMaximumIntegrationStep(2, 0.2);
>     streamer->SetIntegrationDirection(0);
>     streamer->SetIntegrator(integ);
>     streamer->SetRotationScale(0.5);
>     streamer->SetMaximumError(1.0E-8);
>     streamer->DebugOn();
>     streamer->Update();
> 
>     vtkRibbonFilter* rf = vtkRibbonFilter::New();
>     rf->SetInput(streamer->GetOutput());
>     rf->SetWidth(1.0);
>     rf->VaryWidthOff();
> 
>     vtkPolyDataMapper* mapStream = vtkPolyDataMapper::New();
>     mapStream->SetInput(rf->GetOutput());
>     mapStream->SetScalarRange(ugrid->GetScalarRange());
> 
>     vtkActor* streamActor = vtkActor::New();
>     streamActor->SetMapper(mapStream);
> //stop snip
> 
> Thanks!
> --
> Pete
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list