[Insight-users] Minor Bug in ParallelSparseFieldLevelSetImageFilter

Michael Schmidt michael at familie-schmidt.com
Sun May 11 13:29:34 EDT 2008


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



More information about the Insight-users mailing list