[Insight-users] F-measure

Dan Mueller dan.muel at gmail.com
Sun Apr 10 17:50:08 EDT 2011


Hi,

In ITK 3.20, the test code can be found in:
    Testing/Code/Algorithms/itkSTAPLEImageFilterTest.cxx

I'm not sure of the new location in ITKv4.

This test shows the expected usage of the filter. Specifically it
shows that the output of the STAPLE method is specificity and
sensitivity values, not an output image.

HTH

Cheers, Dan

On 9 April 2011 00:25, G G <greenlander1986 at gmail.com> wrote:
> What type of test do you mean, please?
>
> I tried this
>
>     typedef unsigned char             PixelType;
>     const   unsigned int                      InputDimension = 3;
>     typedef itk::Image< PixelType,  InputDimension >     ImageType;
>     typedef  itk::ImageFileReader< ImageType >   ReaderType;
>
> //reading images
>
>   typedef itk::BinaryThresholdImageFilter <ImageType, ImageType>
> BinaryThresholdImageFilterType;
>   BinaryThresholdImageFilterType::Pointer thresholdFilter =
> BinaryThresholdImageFilterType::New();
>   thresholdFilter->SetInput(reader->GetOutput());
>
>   thresholdFilter->SetOutsideValue( 0 );
>   thresholdFilter->SetInsideValue(  255  );
>   thresholdFilter->SetLowerThreshold( 10 );
>   thresholdFilter->SetUpperThreshold( 255 );
>   thresholdFilter->Update();
>
>   BinaryThresholdImageFilterType::Pointer thresholdFilter2 =
> BinaryThresholdImageFilterType::New();
>   thresholdFilter2->SetInput(reader2->GetOutput());
>
>   thresholdFilter2->SetOutsideValue( 3 );
>   thresholdFilter2->SetInsideValue( 255 );
>   thresholdFilter2->SetLowerThreshold( 10 );
>   thresholdFilter2->SetUpperThreshold( 255 );
>   thresholdFilter2->Update();
>
>
>   typedef itk::STAPLEImageFilter <ImageType, ImageType>
> STAPLEImageFilterType;
>   STAPLEImageFilterType::Pointer stapleFilter =
> STAPLEImageFilterType::New();
>   stapleFilter->SetConfidenceWeight(0.10);
>   stapleFilter->SetMaximumIterations(1);
>   stapleFilter->SetInput(0, thresholdFilter->GetOutput());
>   stapleFilter->SetInput(1, thresholdFilter2->GetOutput());
>   stapleFilter->Update();
>
>
> I tried to use same 2 images, another 2 images, another values, but I
> visualize in QVTKwidget only black/empty image
>
> 2011/4/8 Dan Mueller <dan.muel at gmail.com>
>>
>> Hi,
>>
>> Did you try the tests for inspiration?
>>
>> Regards, Dan
>>
>> On 9 April 2011 01:46, G G <greenlander1986 at gmail.com> wrote:
>> > Hi I am trying to use STAPLE method. But I get "empty" or black image
>> > I have this code...
>> >
>> >   typedef itk::STAPLEImageFilter <ImageType, ImageType>
>> > STAPLEImageFilterType;
>> >   STAPLEImageFilterType::Pointer stapleFilter =
>> > STAPLEImageFilterType::New();
>> >   stapleFilter->SetConfidenceWeight(1.0);
>> >   stapleFilter->SetMaximumIterations(1);
>> >   stapleFilter->SetInput(0, reader->GetOutput());
>> >   stapleFilter->SetInput(1, reader2->GetOutput());
>> >   stapleFilter->Update();
>> >
>> > Do you know, what should be problem? first image is default mhd file
>> > (grayscale), second is mhd file after watershed segmentation (RGB
>> > image).
>> >
>> > 2011/4/4 Dan Mueller <dan.muel at gmail.com>
>> >>
>> >> Hi,
>> >>
>> >> You may also be interested in the STAPLE method:
>> >>    Code/Algorithms/itkSTAPLEImageFilter.h
>> >>
>> >>
>> >>  http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.3216&rep=rep1&type=pdf
>> >>    http://midag.cs.unc.edu/pubs/papers/MICCAI05_JJomier_VesselSeg.pdf
>> >>
>> >> Cheers, Dan
>> >>
>> >> On 4 April 2011 09:54, G G <greenlander1986 at gmail.com> wrote:
>> >> > Thank you, I can try it, It looks like very well :))
>> >> >
>> >> > 2011/4/4 Juan Cardelino <juan.cardelino at gmail.com>
>> >> >>
>> >> >> As long as I know, there is no way to compute the F-measure with
>> >> >> ITK,
>> >> >> however you can download the benchmark code from the project home
>> >> >> page:
>> >> >> http://www.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/
>> >> >> It is quite easy to use.
>> >> >> Best regards,
>> >> >>                    Juan
>> >> >>
>> >> >> On Fri, Apr 1, 2011 at 7:51 PM, G G <greenlander1986 at gmail.com>
>> >> >> wrote:
>> >> >> > Hi I would like to compare some images with F-measure method. Can
>> >> >> > ITK
>> >> >> > compute f-measure? If yes, which filter, or which example should i
>> >> >> > use?
>> >> >> > If ITK can some other image comparing, please give me some hint..
>> >> >> > Thank you all
>> >> >> >
>> >> >> >
>> >> >> > _____________________________________
>> >> >> > Powered by www.kitware.com
>> >> >> >
>> >> >> > Visit other Kitware open-source projects at
>> >> >> > http://www.kitware.com/opensource/opensource.html
>> >> >> >
>> >> >> > Kitware offers ITK Training Courses, for more information visit:
>> >> >> > http://www.kitware.com/products/protraining.html
>> >> >> >
>> >> >> > Please keep messages on-topic and check the ITK FAQ at:
>> >> >> > http://www.itk.org/Wiki/ITK_FAQ
>> >> >> >
>> >> >> > Follow this link to subscribe/unsubscribe:
>> >> >> > http://www.itk.org/mailman/listinfo/insight-users
>> >> >> >
>> >> >> >
>> >> >> _____________________________________
>> >> >> Powered by www.kitware.com
>> >> >>
>> >> >> Visit other Kitware open-source projects at
>> >> >> http://www.kitware.com/opensource/opensource.html
>> >> >>
>> >> >> Kitware offers ITK Training Courses, for more information visit:
>> >> >> http://www.kitware.com/products/protraining.html
>> >> >>
>> >> >> Please keep messages on-topic and check the ITK FAQ at:
>> >> >> http://www.itk.org/Wiki/ITK_FAQ
>> >> >>
>> >> >> Follow this link to subscribe/unsubscribe:
>> >> >> http://www.itk.org/mailman/listinfo/insight-users
>> >> >
>> >> >
>> >> > _____________________________________
>> >> > Powered by www.kitware.com
>> >> >
>> >> > Visit other Kitware open-source projects at
>> >> > http://www.kitware.com/opensource/opensource.html
>> >> >
>> >> > Kitware offers ITK Training Courses, for more information visit:
>> >> > http://www.kitware.com/products/protraining.html
>> >> >
>> >> > Please keep messages on-topic and check the ITK FAQ at:
>> >> > http://www.itk.org/Wiki/ITK_FAQ
>> >> >
>> >> > Follow this link to subscribe/unsubscribe:
>> >> > http://www.itk.org/mailman/listinfo/insight-users
>> >> >
>> >> >
>> >
>> >
>
>


More information about the Insight-users mailing list