What type of test do you mean, please? <br><br>I tried this<br><br><span style="font-family: courier new,monospace;">    typedef unsigned char             PixelType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    const   unsigned int                      InputDimension = 3;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    typedef itk::Image&lt; PixelType,  InputDimension &gt;     ImageType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    typedef  itk::ImageFileReader&lt; ImageType &gt;   ReaderType;</span><br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">//reading images</span><br style="font-family: courier new,monospace;"><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 style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  BinaryThresholdImageFilterType::Pointer thresholdFilter2 = BinaryThresholdImageFilterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;SetInput(reader2-&gt;GetOutput());</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;SetOutsideValue( 3 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;SetInsideValue( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;SetLowerThreshold( 10 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;SetUpperThreshold( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  thresholdFilter2-&gt;Update();</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  typedef itk::STAPLEImageFilter &lt;ImageType, ImageType&gt; STAPLEImageFilterType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  STAPLEImageFilterType::Pointer stapleFilter = STAPLEImageFilterType::New();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  stapleFilter-&gt;SetConfidenceWeight(0.10);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  stapleFilter-&gt;SetMaximumIterations(1);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  stapleFilter-&gt;SetInput(0, thresholdFilter-&gt;GetOutput());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  stapleFilter-&gt;SetInput(1, thresholdFilter2-&gt;GetOutput());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  stapleFilter-&gt;Update();</span><br><br><br>I tried to use same 2 images, another 2 images, another values, but I visualize in QVTKwidget only black/empty image<br><br>
<div class="gmail_quote">2011/4/8 Dan Mueller <span dir="ltr">&lt;<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
Did you try the tests for inspiration?<br>
<br>
Regards, Dan<br>
<div><div></div><div class="h5"><br>
On 9 April 2011 01:46, G G &lt;<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>&gt; wrote:<br>
&gt; Hi I am trying to use STAPLE method. But I get &quot;empty&quot; or black image<br>
&gt; I have this code...<br>
&gt;<br>
&gt;   typedef itk::STAPLEImageFilter &lt;ImageType, ImageType&gt;<br>
&gt; STAPLEImageFilterType;<br>
&gt;   STAPLEImageFilterType::Pointer stapleFilter =<br>
&gt; STAPLEImageFilterType::New();<br>
&gt;   stapleFilter-&gt;SetConfidenceWeight(1.0);<br>
&gt;   stapleFilter-&gt;SetMaximumIterations(1);<br>
&gt;   stapleFilter-&gt;SetInput(0, reader-&gt;GetOutput());<br>
&gt;   stapleFilter-&gt;SetInput(1, reader2-&gt;GetOutput());<br>
&gt;   stapleFilter-&gt;Update();<br>
&gt;<br>
&gt; Do you know, what should be problem? first image is default mhd file<br>
&gt; (grayscale), second is mhd file after watershed segmentation (RGB image).<br>
&gt;<br>
&gt; 2011/4/4 Dan Mueller &lt;<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; You may also be interested in the STAPLE method:<br>
&gt;&gt;    Code/Algorithms/itkSTAPLEImageFilter.h<br>
&gt;&gt;<br>
&gt;&gt;  <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.3216&amp;rep=rep1&amp;type=pdf" target="_blank">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.3216&amp;rep=rep1&amp;type=pdf</a><br>

&gt;&gt;    <a href="http://midag.cs.unc.edu/pubs/papers/MICCAI05_JJomier_VesselSeg.pdf" target="_blank">http://midag.cs.unc.edu/pubs/papers/MICCAI05_JJomier_VesselSeg.pdf</a><br>
&gt;&gt;<br>
&gt;&gt; Cheers, Dan<br>
&gt;&gt;<br>
&gt;&gt; On 4 April 2011 09:54, G G &lt;<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Thank you, I can try it, It looks like very well :))<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2011/4/4 Juan Cardelino &lt;<a href="mailto:juan.cardelino@gmail.com">juan.cardelino@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; As long as I know, there is no way to compute the F-measure with ITK,<br>
&gt;&gt; &gt;&gt; however you can download the benchmark code from the project home<br>
&gt;&gt; &gt;&gt; page:<br>
&gt;&gt; &gt;&gt; <a href="http://www.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/" target="_blank">http://www.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/</a><br>
&gt;&gt; &gt;&gt; It is quite easy to use.<br>
&gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt;                    Juan<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Fri, Apr 1, 2011 at 7:51 PM, G G &lt;<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; Hi I would like to compare some images with F-measure method. Can ITK<br>
&gt;&gt; &gt;&gt; &gt; compute f-measure? If yes, which filter, or which example should i<br>
&gt;&gt; &gt;&gt; &gt; use?<br>
&gt;&gt; &gt;&gt; &gt; If ITK can some other image comparing, please give me some hint..<br>
&gt;&gt; &gt;&gt; &gt; Thank you all<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; _____________________________________<br>
&gt;&gt; &gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; _____________________________________<br>
&gt;&gt; &gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; &gt;&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; &gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _____________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>