[vtkusers] traversing cellArray crashes ... ???

Marcel Weiss mweiss at cbs.mpg.de
Mon Jul 6 11:54:17 EDT 2009


no ideas?

----
Dear users,

i´ve problems traversing a vtkCellArray (lines) containing polygonal lines of an vtkPolyData object (input). (see code below!!!)

Although links and cells were built and update() was called the result of GetTraversalLocation() might exceed the limit of "nLines".

The polydata was created by streamling through an scalar image.

What might go wrong and WHY?!

Thanks a lot
Marcel


...
input = xmlPolyReader -> GetOutput();
input -> BuildCells();
input -> BuildLinks();
input -> UpdateInformation();
input -> Update();
...
vtkIdType     nLines= input -> GetNumberOfLines();
vtkCellArray* lines = input -> GetLines();

bool use_profile[nLines];

lines -> InitTraversal();		
while (lines -> GetNextCell(anz, line_points)){
	location = lines -> GetTraversalLocation();
	use_profile[location] = true;   // SIGSEGV possible !!! WHY?
        ...
}



Marcel Weiss
PhD student
Department of Neurophysics
Max Planck Institute for Human Cognitive and Brain Sciences 
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list