[vtkusers] two question, please advice
Ali Habib
ali.mahmoud.habib at gmail.com
Mon Oct 19 09:22:38 EDT 2009
I want to take the volume and apply Delaunary3D on it and vtkstripper to
create mesh
--- about the second question
I have the sphere (vtksphere), I want to create mesh on it (tetrahedral) so
I applied vtkstripper, then vtkDelaunary3D . it give the error under it
I rewrite the code without gcnewvtkSphereSource *sphere =
vtkSphereSource::NEW();
vtkSphereSource *sphere = vtkSphereSource::NEW();
sphere->SetRadius(1.0);
sphere->SetThetaResolution(18);
sphere->SetPhiResolution(18);
vtkStripper *v = vtkStripper::NEW();
v->SetInputConnection(sphere->GetOutputPort());
v->Update();
vtkDelaunay3D *v3 = vtkDelaunay3D::NEW();
v3->SetInputConnection(v->GetOutputPort());
v3->Update();
vtkDataSetMapper *mapper = vtkDataSetMapper::NEW();
mapper->SetInputConnection(v3->GetOutputPort());
vtkActor *triangulation = vtkActor::NEW();
triangulation->SetMapper(mapper);
triangulation->GetProperty()->SetRepresentationToWireframe();
// Create the standard rendering stuff.
vtkRenderer *ren1 = vtkRenderer::NEW();
vtkRenderWindow *renWin = vtkRenderWindow::NEW();
renWin->AddRenderer(ren1);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::NEW();
iren->SetRenderWindow(renWin);
// Add the actors to the renderer, set the background and size
//
ren1->AddActor(triangulation);
ren1->SetBackground(1, 1, 1);
renWin->SetSize(300, 300);
renWin->Render();
renWin->Render();
iren->Initialize();
iren->Start();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091019/0dd859a7/attachment.htm>
More information about the vtkusers
mailing list