[Insight-developers] floating point exception in itkRecursiveSeparableImageFilter.txx

Luis Ibanez luis.ibanez at kitware.com
Mon, 15 Mar 2004 21:34:52 -0500


Hi Charl,

Thanks for pointing this out.

Checking for the value of ( ln == 0 )
sounds like a good idea, note however
that the action to be taken will be
to throw an ITK exception....

If this is ok with you, I'll add the
checks,


Please let me know,


   Thanks


      Luis



-------------------------
Charl P. Botha wrote:
> 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
>