[vtkusers] vtkStreamTracer does not fill area
Jim Shain
jimshain at hotmail.com
Thu Oct 15 16:45:06 EDT 2009
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.
http://clk.atdmt.com/GBL/go/171222985/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091015/53fa8fc9/attachment.htm>
More information about the vtkusers
mailing list