[Insight-users] Minor Bug in ParallelSparseFieldLevelSetImageFilter

Bill Lorensen bill.lorensen at gmail.com
Sun May 11 13:59:56 EDT 2008


Please post a bug and suggested fix.
http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_Bug_Fixes

Bill

On Sun, May 11, 2008 at 1:29 PM, Michael Schmidt
<michael at familie-schmidt.com> wrote:
> Dear all,
>
> the current implementation of ParallelSparseFieldLevelSetImageFilter
> contains a bug that destroys/resets the metainformation of the output image.
> I tracked the problem down to IterateThreaderCallback(void * arg) where
> first a new (temporary) output image is created:
>
> =========Code============
>      // Create the temporary output image
>      str->Filter->m_OutputImageTemp = OutputImageType::New();
>
>  str->Filter->m_OutputImageTemp->SetRegions(str->Filter->m_OutputImage->GetRequestedRegion());
>      str->Filter->m_OutputImageTemp->Allocate();
> =========/Code============
>
> Some lines after that, the old output is replaced by this image:
>
> =========Code============
>      str->Filter->m_OutputImage = 0;
>      str->Filter->m_OutputImage = str->Filter->m_OutputImageTemp;
>      str->Filter->m_OutputImageTemp = 0;
> =========/Code============
>
> I am not very familiar with this filter, but I think something like
> str->Filter->m_OutputImageTemp->CopyInformation(str->Filter->m_OutputImage)
> should do the job. Should I post a bug report on this?
>
> Michael
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list