MantisBT - ITK
View Issue Details
0008288ITKpublic2008-12-11 11:532010-11-17 21:01
Julien Michel 
Bradley Lowekamp 
normalmajoralways
assignedopen 
ITK-3-10 
 
0008288: itk::NCCRegistrationFunction produces segfault when used in a streaming context
The segmentation fault occurs in the ComputeUpdate() method when accessing to the deformation field pixels :

const DeformationPixelType vec = this->GetDeformationField()->GetPixel(index);

There is no check on index to see if it is inside the buffered region, and in a streamed context it might be off the region.

Replacing this line by :

DeformationPixelType vec;
  vec.Fill(0);
  if(this->GetDeformationField()->GetBufferedRegion().IsInside(index))
  {
    vec = this->GetDeformationField()->GetPixel(index);
  }

fixed the problem, without any changes on the non-streamed version results.
No tags attached.
Issue History
2008-12-11 11:53Julien MichelNew Issue
2010-11-02 13:35Hans JohnsonStatusnew => assigned
2010-11-02 13:35Hans JohnsonAssigned To => kentwilliams
2010-11-17 20:59Hans JohnsonAssigned Tokentwilliams => Bradley Lowekamp
2010-11-17 21:01Hans JohnsonNote Added: 0023371

Notes
(0023371)
Hans Johnson   
2010-11-17 21:01   
Brad,

The proposed solution does not seem appropriate for this problem. As the defacto streaming expert, would you take a look at the proposed solution?

Thanks,
Hans