Hi I would like to convert image to binary image.<br>I have mha/mhd image in 3D in grayscale. <br>So I ask you, how should I convert my image to binary image?<br>I tried to use binary threshold image filter. But when I use it, I dont get black&amp;white image, black&amp;dark gray&amp;white image<br>
I am using this code bellow<br><br><span style="font-family: courier new,monospace;">  typedef itk::BinaryThresholdImageFilter &lt;ImageType, ImageType&gt; BinaryThresholdImageFilterType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  BinaryThresholdImageFilterType::Pointer thresholdFilter = BinaryThresholdImageFilterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter-&gt;SetInput(reader-&gt;GetOutput());</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter-&gt;SetOutsideValue( 0 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter-&gt;SetInsideValue(  255  );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  thresholdFilter-&gt;SetLowerThreshold( 10 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter-&gt;SetUpperThreshold( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  thresholdFilter-&gt;Update();</span><br><br>where could be problem? Thanks for ideas :)<br>