[Insight-developers] Warning in itkScalarConnectedComponentImageFilter

Kevin H. Hobbs hobbsk at ohiou.edu
Fri Jul 3 12:20:21 EDT 2009


When the itkScalarConnectedComponentImageFilter is instantiated with an
int pixel type gcc produces a warning like the first one on the farsight
dashboard here:

http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=369974

The line in question is :

return (vnl_math_abs(a-b) <= m_Threshold);

Stephen Aylward suggested on the farsight developers list here:

http://www.kitware.com/cgi-bin/mailman/private/farsight-developers/2009-June/000113.html

that this should be something like :

TInput absDifference = static_cast<TInput>( vnl_math_abs( a-b ) );
if( absDifference <= m_Threshold )
  {
  return true;
  }
else
  {
  return false;
  }

May I make this change?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090703/716c9547/attachment.pgp>


More information about the Insight-developers mailing list