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< PixelType, InputDimension > ImageType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::ImageFileReader< ImageType > 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 <ImageType, ImageType> 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->SetInput(reader->GetOutput());</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter->SetOutsideValue( 0 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter->SetInsideValue( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> thresholdFilter->SetLowerThreshold( 10 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter->SetUpperThreshold( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> thresholdFilter->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->SetInput(reader2->GetOutput());</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter2->SetOutsideValue( 3 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter2->SetInsideValue( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> thresholdFilter2->SetLowerThreshold( 10 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> thresholdFilter2->SetUpperThreshold( 255 );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> thresholdFilter2->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 <ImageType, ImageType> 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->SetConfidenceWeight(0.10);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> stapleFilter->SetMaximumIterations(1);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> stapleFilter->SetInput(0, thresholdFilter->GetOutput());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> stapleFilter->SetInput(1, thresholdFilter2->GetOutput());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> stapleFilter->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"><<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>></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 <<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>> wrote:<br>
> Hi I am trying to use STAPLE method. But I get "empty" or black image<br>
> I have this code...<br>
><br>
> typedef itk::STAPLEImageFilter <ImageType, ImageType><br>
> STAPLEImageFilterType;<br>
> STAPLEImageFilterType::Pointer stapleFilter =<br>
> STAPLEImageFilterType::New();<br>
> stapleFilter->SetConfidenceWeight(1.0);<br>
> stapleFilter->SetMaximumIterations(1);<br>
> stapleFilter->SetInput(0, reader->GetOutput());<br>
> stapleFilter->SetInput(1, reader2->GetOutput());<br>
> stapleFilter->Update();<br>
><br>
> Do you know, what should be problem? first image is default mhd file<br>
> (grayscale), second is mhd file after watershed segmentation (RGB image).<br>
><br>
> 2011/4/4 Dan Mueller <<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>><br>
>><br>
>> Hi,<br>
>><br>
>> You may also be interested in the STAPLE method:<br>
>> Code/Algorithms/itkSTAPLEImageFilter.h<br>
>><br>
>> <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.3216&rep=rep1&type=pdf" target="_blank">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.3216&rep=rep1&type=pdf</a><br>
>> <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>
>><br>
>> Cheers, Dan<br>
>><br>
>> On 4 April 2011 09:54, G G <<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>> wrote:<br>
>> > Thank you, I can try it, It looks like very well :))<br>
>> ><br>
>> > 2011/4/4 Juan Cardelino <<a href="mailto:juan.cardelino@gmail.com">juan.cardelino@gmail.com</a>><br>
>> >><br>
>> >> As long as I know, there is no way to compute the F-measure with ITK,<br>
>> >> however you can download the benchmark code from the project home<br>
>> >> page:<br>
>> >> <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>
>> >> It is quite easy to use.<br>
>> >> Best regards,<br>
>> >> Juan<br>
>> >><br>
>> >> On Fri, Apr 1, 2011 at 7:51 PM, G G <<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>> wrote:<br>
>> >> > Hi I would like to compare some images with F-measure method. Can ITK<br>
>> >> > compute f-measure? If yes, which filter, or which example should i<br>
>> >> > use?<br>
>> >> > If ITK can some other image comparing, please give me some hint..<br>
>> >> > Thank you all<br>
>> >> ><br>
>> >> ><br>
>> >> > _____________________________________<br>
>> >> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >> ><br>
>> >> > Visit other Kitware open-source projects at<br>
>> >> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> >> ><br>
>> >> > Kitware offers ITK Training Courses, for more information visit:<br>
>> >> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>> >> ><br>
>> >> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> >> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> >> ><br>
>> >> > Follow this link to subscribe/unsubscribe:<br>
>> >> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> >> ><br>
>> >> ><br>
>> >> _____________________________________<br>
>> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >><br>
>> >> Visit other Kitware open-source projects at<br>
>> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> >><br>
>> >> Kitware offers ITK Training Courses, for more information visit:<br>
>> >> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>> >><br>
>> >> Please keep messages on-topic and check the ITK FAQ at:<br>
>> >> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> >><br>
>> >> Follow this link to subscribe/unsubscribe:<br>
>> >> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> ><br>
>> ><br>
>> > _____________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Kitware offers ITK Training Courses, for more information visit:<br>
>> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>