[vtkusers] Bug in vtkSmoothPolyDataFilter

Magnotta, Vincent A vincent-magnotta at uiowa.edu
Sat Aug 2 22:34:00 EDT 2008


I am working on an application that uses the vtkSmoothPolyDataFilter and a dataset that was recently given to me has illuminated a bug in vtkSmoothPolyDataFilter. We are smoothing a surface representation that is constrained to a second surface using the SetSource() method. I was getting a segmentation fault in vtkSmoothPolyDataFilter. After running a test case through valgrind I tracked down the problem to incorrect allocation of the weights array, w. 

Line 531 should be
  w = new double[source->GetMaxCellSize()];
It had previously referenced used input->GetMaxCellSize()

Following the code through this section, the cell variable is associated with the source dataset and thus the weights array needs to be to of the appropriate length.

This bug will only appear if you use the SetSource method and have datasets that are of different types such as an input of triangles and the source defined by triangle strips.


Vince


----------------------
Associate Professor 
Department of Radiology 
0453-D JCP 
200 Hawkins Drive 
Iowa City, IA 52242 
E-mail: vincent-magnotta at uiowa.edu 
Phone: 319-356-8255 Fax: 319-353-6275 
Website: http://www.radiology.uiowa.edu 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080802/6aeecf42/attachment.htm>


More information about the vtkusers mailing list