[Insight-users] filter Update() segfault...

stephane barranx sbarranx at modulonet.fr
Thu Mar 9 11:10:00 EST 2006


Hi, can anybody explain to me why this code (typedefs are not included
because it's not the problem..):

////////////
  DilateFilterType::Pointer grayscaleDilate = DilateFilterType::New();
  
  StructuringElementType  structuringElement;
  structuringElement.SetRadius( radiusX );  // 6x6 structuring element
  structuringElement.CreateStructuringElement();
  grayscaleDilate->SetKernel( structuringElement );
  grayscaleDilate->SetInput( data );

  try {
    grayscaleDilate->Update();
  }catch( itk::ExceptionObject & excep ) {
    cerr << "Exception caught !" << endl;
    cerr << excep << endl;
  }
  
  return grayscaleDilate->GetOutput();

///////////

make a segmentation fault while the same code works in a bigger function
where it is used as a step. The only difference is the Update() that is done
to the last step filter in the big function.

please help!
--
View this message in context: http://www.nabble.com/filter-Update%28%29-segfault...-t1253691.html#a3322705
Sent from the ITK - Users forum at Nabble.com.



More information about the Insight-users mailing list