[vtkusers] vtk 3.1 contouring problem
Dimitris Agrafiotis
d.agrafiotis at bristol.ac.uk
Thu Jun 15 12:21:44 EDT 2000
Dear All
I have written a program in Visual C++ that allows the user to
visualize multiple surfaces from the same dataset by choosing more than
one isovalues. The program was running fine under vtk 2.4, but when I
switched to vtk 3.12 the following problem occured. If I select to
visualize more than one surfaces then things are slowed down
tremendously (in fact nothing moves) even if the new surface has only a
few polygons. Also the surface extraction and rendering of the second
surface seem to take ages. I didn't have any problems with vtk 2.4 (I
could actually visualize up to 5 surfaces with no problem - only limit
was the number of triangles)and I have no idea why this happens.
The pipeline fragment of the program is the following:
vtkMarchingCubes* mcFilter = vtkMarchingCubes::New();
mcFilter->SetValue(0, isoDlg.m_nIsoValue); // user value
mcFilter->SetInput(histogram.accumulate->GetInput());
mcFilter->Update();
vtkStripper* stripper = vtkStripper::New();
stripper->SetInput(mcFilter->GetOutput());
vtkPolyDataMapper* Mapper = vtkPolyDataMapper::New();
Mapper->ImmediateModeRenderingOn();
Mapper->ScalarVisibilityOff();
if (!this->representation)
Mapper->SetInput(mcFilter->GetOutput());
else
Mapper->SetInput(stripper->GetOutput());
Mapper->Update();
vtkLODActor* Actor = vtkLODActor::New();
Actor->VisibilityOn();
Actor->SetMapper(Mapper);
this->Props->AddItem(Actor);
// Delete objects
mcFilter->Delete();
stripper->Delete();
Mapper->Delete();
Actor->Delete();
where Props is of type vtkPropCollection. So whenever the user chooses
a new isovalue a new actor is added to the collection of actors.
All the actors in the collection are added to the
one and only renderer.
Is there some sort of bug in vtkMarchingCubes of the latest vtk
version? Maybe I am doing something wrong, but with vtk2.4 everything
worked perfectly. Please let me know if there is a solution to this and
if anyone had similar problems.
Thanks in advance
Dimitris
----------------------
Dimitris Agrafiotis
University of Bristol
Department of Electrical & Electronic Engineering
Merchant Venturers Building
Woodland Road, Bristol BS8 1UB, UK
Phone: (+ 44 117) 9545194
E-mail: d.agrafiotis at bristol.ac.uk
More information about the vtkusers
mailing list