[vtk-developers] TestEmptyInput fail on Borland

Dean Inglis dean.inglis at on.aibn.com
Fri Oct 25 15:43:12 EDT 2002


Hi,

vtkQuadricClustering fails during the test with empty vtkPolyData input
in Execute because int target = this->GetInput()->GetNumberOfPoints();
results in target = 0,
  int numDiv = (this->NumberOfXDivisions * this->NumberOfYDivisions
                  * this->NumberOfZDivisions) / 2;
  if (numDiv > target)
    {
    double factor = pow(((double)numDiv/(double)target),0.33333);

then divide by zero occurs because (numDiv = 62500 by default values ) >
target
Perhaps a check if target == 0 is in order?

Dean


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Inglis, Ph.D.
-      Centre for Appendicular       -
- Magnetic Resonance Imaging Studies -
25 Charlton Avenue East, Unit 610
Hamilton, ONT, L8N 1Y2
tel: (905) 527-0028
fax: (905) 521-1297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the vtk-developers mailing list