[Insight-developers] floating point exception in itkRecursiveSeparableImageFilter.txx
Charl P. Botha
c.p.botha at ewi.tudelft.nl
15 Mar 2004 18:46:13 +0100
Dear developers,
I'm busy robustifying the ITK<->VTK import/export code. It seems that
not many people keep in mind that VTK/ITK pipelines can easily be
disconnected and reconfigured at runtime. A very easy way to break
VTK/ITK/VTK pipelines is to remove a source at the beginning for
instance.
As part of this work, I've run into the following lines in
itkRecursiveSeparableImageFilter.txx:
const unsigned int ln = region.GetSize()[ this->m_Direction ];
.
. later...
.
const unsigned int numberOfLinesToProcess = offsetTable[
TInputImage::ImageDimension ] / ln;
Obviously if ln is zero, your application dies with a floating point
exception. Wouldn't it be prudent to check for this condition when ln
is set?
Thanks,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/