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

Tom Vercauteren tom.vercauteren at m4x.org
Wed Mar 4 17:49:10 EST 2009


Thanks Luis,

I've committed a patch:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkNaryFunctorImageFilter.txx?hideattic=0&r1=1.22&r2=1.23&sortby=date&root=Insight

Tom

On Wed, Mar 4, 2009 at 21:44, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi Tom,
>
> Thanks for pointing this out.
>
> I agree with you in that this code seems to be unnecessary,
>
> and it is certainly inconvenient when running InPlace  :-)
>
> Removing that initialization sounds good...
>
> Although only running an Experimental build
> will tell us for sure...
>
>
>   Luis
>
>
>
> ----------------------
> Tom Vercauteren wrote:
>>
>> 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
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>


More information about the Insight-developers mailing list