[vtkusers] vtkStreamTracer does not fill area

Berk Geveci berk.geveci at kitware.com
Fri Oct 16 08:52:41 EDT 2009


Can you post an example dataset and an image? (or e-mail them to me directly)

2009/10/15 Jim Shain <jimshain at hotmail.com>:
>
> Hi,
>
> When I try to use  vtkStreamTracer the Streamlines do not go all the way to
> the edge of the object.  It stops a bit short, giving the impression that
> there are no Streamlines there.   I get the streamer from an vtkExtractGrid
> (igrid below).  After the Streamline I use a vtkPolyDataMapper (mapper,
> below) and a vtkActor (called actor down below).  The pp_ below has a list
> of processor data.
>
>  I have looked around quite a bit and cannot find a solution.
>
>
> vtkSmartPointer<vtkExtractGrid> igrid;
> igrid.TakeReference(vtkExtractGrid::New());
>
> igrid->SetInputConnection(pdata_[i]->GetOutputPort());
> igrid->SetSampleRate(skip+1, 1, skip+1);
> igrid->IncludeBoundaryOn();
>
> // streamer
> vtkSmartPointer<vtkStreamTracer> streamer;
> streamer.TakeReference(vtkStreamTracer::New());
> streamer->SetInputConnection(pdata_[i]->GetOutputPort());
> streamer->SetSource(igrid->GetOutput());
> streamer->SetMaximumPropagation(2,pp_->nj(i));
>
> streamer->SetMinimumIntegrationStep(2,0.1);
> streamer->SetMaximumIntegrationStep(2,1.0);
> streamer->SetInitialIntegrationStep(2, 0.5);
>
> streamer->SetIntegratorTypeToRungeKutta45();
> streamer->SetMaximumError(1.0e-8);
> streamer->SetIntegrationDirectionToBoth();
> streamer->ComputeVorticityOff();
>
> // mapper
> vtkSmartPointer<vtkPolyDataMapper> mapper;
> mapper.TakeReference(vtkPolyDataMapper::New());
> mapper->SetInputConnection(streamer->GetOutputPort());
> mapper->ScalarVisibilityOn();
> mapper->ImmediateModeRenderingOn();
> mappers_.push_back(mapper);
> streamline_mappers_.push_back(mapper);
>
>
> // add actor
> for(int rot=rot_beg;rot<rot_end;++rot)
> {
>    double rotate = rot*360.0/nblades;
>    vtkSmartPointer<vtkActor> actor;
>    if(!rot)
>    {
>       actor.TakeReference(vtkActor::New());
>       actor->SetMapper(mapper);
>       actor->RotateZ(rotate);
>       actor->SetVisibility(0);
>       ren_->AddActor(actor);
>    }
>    streamlines_.push_back(actor);
> }
>
>
> Thanks!
>
> Jim Shain
>
>
> ________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list