algorithms.registration.similarity_measures

Module: algorithms.registration.similarity_measures

Inheritance diagram for nipy.algorithms.registration.similarity_measures:

digraph inheritanced9abb88a7c { rankdir=LR; size="8.0, 12.0"; "registration.similarity_measures.CorrelationCoefficient" [URL="#nipy.algorithms.registration.similarity_measures.CorrelationCoefficient",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use a bivariate Gaussian as a distribution model"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.CorrelationCoefficient" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.CorrelationRatio" [URL="#nipy.algorithms.registration.similarity_measures.CorrelationRatio",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use a nonlinear regression model with Gaussian errors as a"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.CorrelationRatio" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.CorrelationRatioL1" [URL="#nipy.algorithms.registration.similarity_measures.CorrelationRatioL1",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use a nonlinear regression model with Laplace distributed errors"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.CorrelationRatioL1" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.DiscreteParzenMutualInformation" [URL="#nipy.algorithms.registration.similarity_measures.DiscreteParzenMutualInformation",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use Parzen windowing in the discrete case to estimate the"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.DiscreteParzenMutualInformation" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.MutualInformation" [URL="#nipy.algorithms.registration.similarity_measures.MutualInformation",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use the normalized joint histogram as a distribution model"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.MutualInformation" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.NormalizedMutualInformation" [URL="#nipy.algorithms.registration.similarity_measures.NormalizedMutualInformation",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="NMI = 2*(1 - H(I,J)/[H(I)+H(J)])"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.NormalizedMutualInformation" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.ParzenMutualInformation" [URL="#nipy.algorithms.registration.similarity_measures.ParzenMutualInformation",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Use Parzen windowing to estimate the distribution model"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.ParzenMutualInformation" [arrowsize=0.5,style="setlinewidth(0.5)"]; "registration.similarity_measures.SimilarityMeasure" [URL="#nipy.algorithms.registration.similarity_measures.SimilarityMeasure",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Template class"]; "registration.similarity_measures.SupervisedLikelihoodRatio" [URL="#nipy.algorithms.registration.similarity_measures.SupervisedLikelihoodRatio",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Assume a joint intensity distribution model is given by self.dist"]; "registration.similarity_measures.SimilarityMeasure" -> "registration.similarity_measures.SupervisedLikelihoodRatio" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Classes

CorrelationCoefficient

class nipy.algorithms.registration.similarity_measures.CorrelationCoefficient(shape, renormalize=False, dist=None)[source]

Bases: nipy.algorithms.registration.similarity_measures.SimilarityMeasure

Use a bivariate Gaussian as a distribution model

__init__(shape, renormalize=False, dist=None)

Initialize self. See help(type(self)) for accurate signature.

loss(H)[source]
npoints(H)

CorrelationRatio

class nipy.algorithms.registration.similarity_measures.CorrelationRatio(shape, renormalize=False, dist=None)[source]

Bases: nipy.algorithms.registration.similarity_measures.SimilarityMeasure

Use 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.SimilarityMeasure

Use 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.SimilarityMeasure

Use 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.

loss(H)[source]
npoints(H)

MutualInformation

class nipy.algorithms.registration.similarity_measures.MutualInformation(shape, renormalize=False, dist=None)[source]

Bases: nipy.algorithms.registration.similarity_measures.SimilarityMeasure

Use the normalized joint histogram as a distribution model

__init__(shape, renormalize=False, dist=None)

Initialize self. See help(type(self)) for accurate signature.

loss(H)[source]
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.SimilarityMeasure

Use Parzen windowing to estimate the distribution model

__init__(shape, renormalize=False, dist=None)

Initialize self. See help(type(self)) for accurate signature.

loss(H)[source]
npoints(H)

SimilarityMeasure

class nipy.algorithms.registration.similarity_measures.SimilarityMeasure(shape, renormalize=False, dist=None)[source]

Bases: object

Template class

__init__(shape, renormalize=False, dist=None)[source]

Initialize self. See help(type(self)) for accurate signature.

loss(H)[source]
npoints(H)[source]

SupervisedLikelihoodRatio

class nipy.algorithms.registration.similarity_measures.SupervisedLikelihoodRatio(shape, renormalize=False, dist=None)[source]

Bases: nipy.algorithms.registration.similarity_measures.SimilarityMeasure

Assume 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.

loss(H)[source]
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.