[vtkusers] Thanks + Help!
Lisa S. Avila
lisa.avila at kitware.com
Fri Apr 6 13:11:32 EDT 2001
Hello John,
>Mine is the only one that crashes. I'm stepping through the code with the
>debugger and sure enough the
>mean /= count;
>
>line in vtkImageQuantizeRGBToIndex is dividing zero by zero and throwing
>an exception as no pixels have a certain colour (histogram bin is empty it
>seems - but I've not examined the algorithm fully yet). (I have the
>correct vtk.tif image - checked with one reply poster)
That's my code - I'll look into it and fix it so that it can't divide by 0
(clearly it is a bug that it doesn't check before the division). That
should fix your crashing problem, but maybe not the underlying problem of
why you are the only one seeing the crash.
Lisa
More information about the vtkusers
mailing list