[vtkusers] Merging two vtkPolydata.

prabhat246 prabhat246 at yahoo.com
Thu Jun 26 05:34:12 EDT 2008


I have output of two different marching cubes algorithm.

I want to combine them into one and display or may be modify the merged
polydata.
What is the best way of doing show.

When I am doing

vtkMarchingCubes *mc = vtkMarchingCubes::New();
mc->SetValue(0,160);
mc->Update();

vtkPolyDataMapper polyMapper = vtkPolyDataMapper::New();
vtkActor polyActor  = vtkActor::New();
polyActor->SetMapper( polyMapper );
polyMapper->SetInput( mc->GetOutput() );
polyMapper->ScalarVisibilityOff();
renderer->AddActor( polyActor );
			    

vtkMarchingCubes *mc2 = vtkMarchingCubes::New();
mc2->SetValue(0,160);
mc2->Update();
vtkPolyDataMapper polyMapper2 = vtkPolyDataMapper::New();
vtkActor *polyActor2  = vtkActor::New();
polyActor-2>SetMapper( polyMapper2 );
polyMapper2->SetInput( mc2->GetOutput() );
polyMapper2->ScalarVisibilityOff();
renderer->AddActor( polyActor2 );

I am getting an output windows saying vtkFloatArray unable to allocate
memory for ***** elements of size ***. something

How can I avoid this memory overflow????
Any fast reply would be appreciated. Thanks a lot....

Regards,
Prabhat Kumar Gupta
-- 
View this message in context: http://www.nabble.com/Merging-two-vtkPolydata.-tp18130032p18130032.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list