[Insight-developers] [itk::MRIBiasFieldCorrectionFilter] : using a mask

Nicolas Rannou nrannou at bwh.harvard.edu
Thu Apr 23 18:41:22 EDT 2009


Hi all,

I am currently trying to use the MRIBiasFieldCorrectionFilter to create a simple application, but I have some troubles using it.
I can launch the filter just setting the input image and the tissue meansvalues, but I can't add a mask.
As soon as i try to add the mask, a segmentation fault appears.
 
I want to create the mask doing a binary threshold filtering(itk::BinaryThresholdImageFilter), and then, apply the filtered image as the mask to my other filter.

Lines in my code where I add the mask to the filter (lines 77-78):
  filter->SetInputMask( mfilter->GetOutput() );
  filter->SetOutputMask( mfilter->GetOutput() );

If I delete these lines, the filtering works but is not good enough that's why I want to add the mask.
I see where the problem is but I couldn't fix it yet.

Can you help me with this issue?
Please find enclosed my c++ code and my error message.

Thanks,
Nicolas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cxx
Type: text/x-c++src
Size: 4752 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090423/41622645/attachment.cxx>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: segm fault.txt
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090423/41622645/attachment.txt>


More information about the Insight-developers mailing list