[vtkusers] problems with GetCellNeighbors

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Jun 26 09:31:48 EDT 2006


Hi,

The following code retrieves cell points, but not cell neighbours, what
is wrong?

  vtkUnstructuredGrid* grid;
  //...
  for(int id=0; id<NCELLS; id++){
	 vtkIdList* points = vtkIdList::New();
	 vtkIdList* cells = vtkIdList::New();
	 grid->GetCellPoints(id,points);
	 grid->GetCellNeighbors(id,points,cells);
	 int np = points->GetNumberOfIds();
	 int nc = cells->GetNumberOfIds();
	 cerr << nc << endl;// always 0
	 points->Delete();
	 cells->Delete();
  }

thanks,
Dominik

-- 
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list