[vtkusers] vtkStreamTracer does not fill area

Berk Geveci berk.geveci at kitware.com
Fri Oct 16 14:56:32 EDT 2009


I meant the input dataset. Whatever pdata_[i] is producing.

On Fri, Oct 16, 2009 at 10:19 AM, Jim Shain <jimshain at hotmail.com> wrote:
>
> I've enclosed an image.
>
> The SampleRate is   igrid->SetSampleRate(4, 1, 4);
>
> A smaller SampleRate has more Streamlines but the skip over the pieces is
> still there (it's just a bit harder to see).  Larger SampleRates obviously
> have fewer lines but the skip is still there.
>
> I do not see how to get the dataset out of vtkStreamTracer (which is
> streamer down below).   PrintSelf?  Print?  I have tried several different
> ways and could not get that to work.  How can I do that?
>
> Thanks!
>
> Jim
>
>
>
>
>> Date: Fri, 16 Oct 2009 08:52:41 -0400
>> Subject: Re: [vtkusers] vtkStreamTracer does not fill area
>> From: berk.geveci at kitware.com
>> To: jimshain at hotmail.com
>> CC: vtkusers at vtk.org
>>
>> 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
>> >
>> >
>
> ________________________________
> Hotmail: Free, trusted and rich email service. Get it now.



More information about the vtkusers mailing list