algorithms.registration.similarity_measures¶
Module: algorithms.registration.similarity_measures¶
Inheritance diagram for nipy.algorithms.registration.similarity_measures:
Classes¶
CorrelationCoefficient¶
-
class
nipy.algorithms.registration.similarity_measures.CorrelationCoefficient(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse a bivariate Gaussian as a distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
npoints(H)¶
-
CorrelationRatio¶
-
class
nipy.algorithms.registration.similarity_measures.CorrelationRatio(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse a nonlinear regression model with Gaussian errors as a distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
loss(H)¶
-
npoints(H)¶
-
CorrelationRatioL1¶
-
class
nipy.algorithms.registration.similarity_measures.CorrelationRatioL1(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse a nonlinear regression model with Laplace distributed errors as a distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
loss(H)¶
-
npoints(H)¶
-
DiscreteParzenMutualInformation¶
-
class
nipy.algorithms.registration.similarity_measures.DiscreteParzenMutualInformation(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse Parzen windowing in the discrete case to estimate the distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
npoints(H)¶
-
MutualInformation¶
-
class
nipy.algorithms.registration.similarity_measures.MutualInformation(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse the normalized joint histogram as a distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
npoints(H)¶
-
NormalizedMutualInformation¶
-
class
nipy.algorithms.registration.similarity_measures.NormalizedMutualInformation(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasure- NMI = 2*(1 - H(I,J)/[H(I)+H(J)])
= 2*MI/[H(I)+H(J)])
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
loss(H)¶
-
npoints(H)¶
ParzenMutualInformation¶
-
class
nipy.algorithms.registration.similarity_measures.ParzenMutualInformation(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureUse Parzen windowing to estimate the distribution model
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
npoints(H)¶
-
SimilarityMeasure¶
SupervisedLikelihoodRatio¶
-
class
nipy.algorithms.registration.similarity_measures.SupervisedLikelihoodRatio(shape, renormalize=False, dist=None)[source]¶ Bases:
nipy.algorithms.registration.similarity_measures.SimilarityMeasureAssume a joint intensity distribution model is given by self.dist
-
__init__(shape, renormalize=False, dist=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
npoints(H)¶
-
Functions¶
-
nipy.algorithms.registration.similarity_measures.correlation2loglikelihood(rho2, npts)[source]¶ Re-normalize correlation.
Convert a squared normalized correlation to a proper log-likelihood associated with a registration problem. The result is a function of both the input correlation and the number of points in the image overlap.
See: Roche, medical image registration through statistical inference, 2001.
- Parameters
rho2: float
Squared correlation measure
npts: int
Number of points involved in computing rho2
- Returns
ll: float
Log-likelihood re-normalized rho2
-
nipy.algorithms.registration.similarity_measures.dist2loss(q, qI=None, qJ=None)[source]¶ Convert a joint distribution model q(i,j) into a pointwise loss:
L(i,j) = - log q(i,j)/(q(i)q(j))
where q(i) = sum_j q(i,j) and q(j) = sum_i q(i,j)
See: Roche, medical image registration through statistical inference, 2001.