[ITK] How to get to get image similarity metrics under .NET ?

Oleg Subachev osubachev at gmail.com
Wed Nov 18 09:51:40 EST 2015


Thanks, Brad.

But when I try this code:
using ( ImageRegistrationMethod method = new ImageRegistrationMethod() )
{
method.SetMetricAsMattesMutualInformation( 50 );
double metric = method.MetricEvaluate( SimpleITK.ReadImage( "1.png" ),
SimpleITK.ReadImage( "2.png" ) );
}

I get the exception:
{"Exception thrown in SimpleITK
ImageRegistrationMethod_MetricEvaluate:
..\\..\\..\\..\\..\\SimpleITK\\Code\\Registration\\src\\sitkImageRegistrationMethod.cxx:862:\nsitk::ERROR:
Filter does not support fixed image type: vector of 8-bit unsigned
integer"}

What's wrong ?
What is the simplest way to get similarity value of two image files ?

-- 
Best regards,
Oleg Subachev

On Tue, Nov 17, 2015 at 6:41 PM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Hello,
>
> You should look into SimpleITK's ImageRegistrationMethod::MetricEvaluate( Image, Image ) member function.
>
> Here is a Python example of using the method, C# should be similar:
>
> http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/63_Registration_Initialization.html
>
> HTH,
> Brad
>
> On Nov 17, 2015, at 8:24 AM, Oleg Subachev <osubachev at gmail.com> wrote:
>
>> I need to get similarity metrics for 2D images under .NET.
>> According to ITK documentation
>> (http://www.itk.org/Doxygen/html/ImageSimilarityMetricsPage.html)
>> there are several Image To Image metrics available.
>> ITK itself contains corresponding methods.
>> But I cannot find those methods in SimpleITK :-(
>> There is SimpleITK.NormalizedCorrelation(Image, Image, Image) method,
>> but it seems to have nothing with similarity metrics.
>>
>> How to get to get image similarity metrics under .NET ?
>>
>> --
>> Best regards,
>>
>> Oleg Subachev
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list