Inheritance diagram for nipy.algorithms.registration.histogram_registration:
Intensity-based image registration
Bases: object
A class to reprensent a generic intensity-based image registration algorithm.
Methods
eval(T) | Evaluate similarity function given a world-to-world transform. |
eval_gradient(T[, epsilon]) | Evaluate the gradient of the similarity function wrt transformation parameters. |
eval_hessian(T[, epsilon, diag]) | Evaluate the Hessian of the similarity function wrt transformation parameters. |
explore(T, *args) | Evaluate the similarity at the transformations specified by sequences of parameter values. |
optimize(T[, optimizer]) | Optimize transform T with respect to similarity measure. |
set_fov([spacing, corner, size, npoints]) | Defines a subset of the from image to restrict joint histogram computation. |
subsample([spacing, npoints]) |
Creates a new histogram registration object.
Parameters: | from_img : nipy-like image
dist: None or array-like :
interp : str
smooth : float
|
---|
Evaluate similarity function given a world-to-world transform.
Parameters: | T : Transform
|
---|
Evaluate the gradient of the similarity function wrt transformation parameters.
The gradient is approximated using central finite differences at the transformation specified by T. The input transformation object T is modified in place unless it has a copy method.
Parameters: | T : Transform
epsilon : float
|
---|---|
Returns: | g : ndarray
|
Evaluate the Hessian of the similarity function wrt transformation parameters.
The Hessian or its diagonal is approximated at the transformation specified by T using central finite differences. The input transformation object T is modified in place unless it has a copy method.
Parameters: | T : Transform
epsilon : float
diag : bool
|
---|---|
Returns: | H : ndarray
|
Evaluate the similarity at the transformations specified by sequences of parameter values.
For instance:
s, p = explore(T, (0, [-1,0,1]), (4, [-2.,2]))
Parameters: | T : object
args : tuple
|
---|---|
Returns: | s : ndarray
p : ndarray
|
Optimize transform T with respect to similarity measure.
The input object T will change as a result of the optimization.
Parameters: | T : object or str
optimizer : str
**kwargs : dict
|
---|---|
Returns: | T : object
|
Defines a subset of the from image to restrict joint histogram computation.
Parameters: | spacing : sequence (3,) of positive integers
corner : sequence (3,) of positive integers
size : sequence (3,) of positive integers
npoints : positive integer
|
---|
Approximate the gradient of a function using central finite differences
Parameters: | f: callable :
x: ndarray :
epsilon: float :
|
---|---|
Returns: | g: ndarray :
|
Approximate the full Hessian matrix of a function using central finite differences
Parameters: | f: callable :
x: ndarray :
epsilon: float :
|
---|---|
Returns: | H: ndarray :
|
Approximate the Hessian diagonal of a function using central finite differences
Parameters: | f: callable :
x: ndarray :
epsilon: float :
|
---|---|
Returns: | h: ndarray :
|
Clamp array values that fall within a given mask in the range [0..bins-1] and reset masked values to -1.
Parameters: | x : ndarray
bins : number
mask : ndarray, tuple or slice
|
---|---|
Returns: | y : ndarray
bins : number
|
Tune spacing factors so that the number of voxels in the output block matches a given number.
Parameters: | data : ndarray or sequence
npoints : number
|
---|---|
Returns: | spacing: ndarray :
|
Extract the smallest bounding box from a mask
Parameters: | msk : ndarray
|
---|---|
Returns: | corner: ndarray :
size: ndarray :
|
Smooth an image by an isotropic Gaussian filter
Parameters: | data: ndarray :
affine: ndarray :
sigma: float :
|
---|---|
Returns: | sdata: ndarray :
|