<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Bug in vtkSmoothPolyDataFilter</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>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.<BR>
<BR>
Line 531 should be<BR>
w = new double[source->GetMaxCellSize()];<BR>
It had previously referenced used input->GetMaxCellSize()<BR>
<BR>
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.<BR>
<BR>
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.<BR>
<BR>
<BR>
Vince<BR>
<BR>
<BR>
----------------------<BR>
Associate Professor<BR>
Department of Radiology<BR>
0453-D JCP<BR>
200 Hawkins Drive<BR>
Iowa City, IA 52242<BR>
E-mail: vincent-magnotta@uiowa.edu<BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <A HREF="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>