-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got the same results when using ants.image_similarity with different types #479
Comments
I think you might be seeing 'JointHistogramMutualInformation' for both cases. The underlying library function compares the metric_type to the different options by the "==" operator. This might be getting confused by different encoding of Python and C++ strings.
I'm not sure of the best solution but will look into it. The function appears to not call the ANTs MeasureImageSimilarity program directly, but it might produce the same results nonetheless because it evaluates the same metrics. |
If you figure out how to get the 'ANTsNeighborhoodCorrelation' metric, please let me know, thank you so much! |
Looks like it's not string encoding because pybind11 takes care of that https://pybind11.readthedocs.io/en/stable/advanced/cast/strings.html The weird thing is other metric return different values, MeanSquares, Correlation, MattesMutualInformation are all unique. But |
It's a typo! Try "ANTSNeighborhoodCorrelation" not "ANTsNeighborhoodCorrelation". I'll work on making this not silently fail |
Actually |
@cookpa I am looking forward to it. Thanks again for your help! |
I am using ants.image_similarity to calculate the histogram mutual information and the Neighborhood cross correlation
but got two same results,
cc_metric
=mi_metric
. Should they be the same? Is there anything wrong between these two metric_type?BTW, is this function corresponding to
MeasureImageSimilarity
in ANTs?The text was updated successfully, but these errors were encountered: