Inheritance diagram for nipy.neurospin.group.displacement_field:
Sampling of multiple vector-valued displacement fields on a 3D-lattice. Displacement fields are generated as linear combinations of fixed displacements. The coefficients are random Gaussian variables.
Input : XYZ (3,p) array of voxel coordinates sigma <float> standard deviate of Gaussian filter kernel
Each displacement block has length 4*sigma
n <int> number of generated displacement fields. mask (q,) displacement blocks are limited to mask The constructor creates the following fields : self.block List of N block masks (voxel index vectors) self.weights List of N block weights (same shape as the masks) self.U (3,n,N) Displacement coefficients self.V (3,n,p) Displacements self.W (3,n,p) Discretize displacements self.I (n,p) Displaced voxels index
(voxel k in the mask is displaced by field i to voxel self.I[i,k])
Multi-dimensional Squared Gaussian filter.
The standard-deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes.
Note: The multi-dimensional filter is implemented as a sequence of one-dimensional convolution filters. The intermediate arrays are stored in the same data type as the output. Therefore, for output types with a limited precision, the results may be imprecise because intermediate results may be stored with insufficient precision.
One-dimensional Squared Gaussian filter.
The standard-deviation of the Gaussian filter is given by sigma.