[Insight-developers] NaryFunctorImageFilter starts by clearing its output - any reason for that?

Tom Vercauteren tom.vercauteren at m4x.org
Wed Mar 4 15:33:17 EST 2009


Hi all,

I just filed a bug report about NaryFunctorImageFilter not being able
to run inplace:
http://www.itk.org/Bug/view.php?id=8672

The reason is that NaryFunctorImageFilter::ThreadedGenerateData starts
by clearing the output data:

  // Clear the content of the output
  outputIt.GoToBegin();
  while( !outputIt.IsAtEnd() )
    {
    outputIt.Set( itk::NumericTraits< OutputImagePixelType >::Zero );
    ++outputIt;
    }

Hence if the filter is run in place, it starts by clearing its first input.

Is there a good reason for this clearing or may I just go an remove that step?

Regards,
Tom


More information about the Insight-developers mailing list