[vtkusers] vtkStreamTracer does not fill area
Jim Shain
jimshain at hotmail.com
Fri Oct 16 10:19:18 EDT 2009
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.
http://clk.atdmt.com/GBL/go/171222984/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091016/777e2496/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Streamlineproblem.jpg
Type: image/pjpeg
Size: 66124 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091016/777e2496/attachment.bin>
More information about the vtkusers
mailing list