Closed Mo-Junyang closed 1 year ago
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.
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 ANTsNeighborhoodCorrelation
is wrong somehow
It's a typo!
Try "ANTSNeighborhoodCorrelation" not "ANTsNeighborhoodCorrelation". I'll work on making this not silently fail
Actually ANTSNeighborhoodCorrelation
won't work, but I'll fix that
@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?