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

Dženan Zukić dzenanz at gmail.com
Wed Nov 18 10:27:31 EST 2015


Hi Oleg,

you seem to be reading RGB images. Can you convert them to grayscale and
try again?

Regards,
Dženan

On Wed, Nov 18, 2015 at 9:51 AM, Oleg Subachev <osubachev at gmail.com> wrote:

> 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
> >
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20151118/fe15e760/attachment.html>


More information about the Community mailing list