denoise
bench 
Run benchmarks for module using nose. 
test 
Run tests for module using nose. 
denoise.adaptive_soft_matching
adaptive_soft_matching (ima, fimau, fimao, sigma) 
Adaptive Soft Coefficient Matching 
denoise.localpca
eigh (a[, b, lower, eigvals_only, …]) 
Solve an ordinary or generalized eigenvalue problem for a complex Hermitian or real symmetric matrix. 
localpca (arr, sigma[, mask, pca_method, …]) 
Local PCAbased denoising of diffusion datasets. 
denoise.nlmeans
nlmeans (arr, sigma[, mask, patch_radius, …]) 
Nonlocal means for denoising 3D and 4D images 
nlmeans_3d 
Nonlocal means for denoising 3D images 
denoise.noise_estimate
convolve (input, weights[, output, mode, …]) 
Multidimensional convolution. 
estimate_sigma (arr[, …]) 
Standard deviation estimation from local patches 
piesno (data, N[, alpha, l, itermax, eps, …]) 
Probabilistic Identification and Estimation of Noise (PIESNO). 
denoise.non_local_means
nlmeans_block 
NonLocal Means Denoising Using Blockwise Averaging 
non_local_means (arr, sigma[, mask, …]) 
Nonlocal means for denoising 3D and 4D images, using 
dipy.denoise.
bench
(label='fast', verbose=1, extra_argv=None)Run benchmarks for module using nose.
Parameters: 


Returns: 

Notes
Benchmarks are like tests, but have names starting with “bench” instead of “test”, and can be found under the “benchmarks” subdirectory of the module.
Each NumPy module exposes bench in its namespace to run all benchmarks for it.
Examples
>>> success = np.lib.bench()
Running benchmarks for numpy.lib
...
using 562341 items:
unique:
0.11
unique1d:
0.11
ratio: 1.0
nUnique: 56230 == 56230
...
OK
>>> success
True
dipy.denoise.
test
(label='fast', verbose=1, extra_argv=None, doctests=False, coverage=False, raise_warnings=None, timer=False)Run tests for module using nose.
Parameters: 


Returns: 

Notes
Each NumPy module exposes test in its namespace to run all tests for it. For example, to run all tests for numpy.lib:
>>> np.lib.test()
Examples
>>> result = np.lib.test()
Running unit tests for numpy.lib
...
Ran 976 tests in 3.933s
OK
>>> result.errors
[]
>>> result.knownfail
[]
dipy.denoise.adaptive_soft_matching.
adaptive_soft_matching
(ima, fimau, fimao, sigma)Adaptive Soft Coefficient Matching
Combines two filtered 3Dimages at different resolutions and the orginal image. Returns the resulting combined image.
Parameters: 


Returns: 

References
[Coupe11]  Pierrick Coupe, Jose Manjon, Montserrat Robles, Louis Collins. “Multiresolution NonLocal Means Filter for 3D MR Image Denoising” IET Image Processing, Institution of Engineering and Technology, 2011 
dipy.denoise.localpca.
eigh
(a, b=None, lower=True, eigvals_only=False, overwrite_a=False, overwrite_b=False, turbo=True, eigvals=None, type=1, check_finite=True)Solve an ordinary or generalized eigenvalue problem for a complex Hermitian or real symmetric matrix.
Find eigenvalues w and optionally eigenvectors v of matrix a, where b is positive definite:
a v[:,i] = w[i] b v[:,i]
v[i,:].conj() a v[:,i] = w[i]
v[i,:].conj() b v[:,i] = 1
Parameters: 


Returns: 

Raises: 

See also
eigvalsh
eig
eigh
eigh_tridiagonal
Notes
This function does not check the input array for being hermitian/symmetric in order to allow for representing arrays with only their upper/lower triangular parts.
Examples
>>> from scipy.linalg import eigh
>>> A = np.array([[6, 3, 1, 5], [3, 0, 5, 1], [1, 5, 6, 2], [5, 1, 2, 2]])
>>> w, v = eigh(A)
>>> np.allclose(A @ v  v @ np.diag(w), np.zeros((4, 4)))
True
dipy.denoise.localpca.
localpca
(arr, sigma, mask=None, pca_method='eig', patch_radius=2, tau_factor=2.3, out_dtype=None)Local PCAbased denoising of diffusion datasets.
Parameters: 


Returns: 

References
[Manjon13]  (1, 2) Manjon JV, Coupe P, Concha L, Buades A, Collins DL (2013) Diffusion Weighted Image Denoising Using Overcomplete Local PCA. PLoS ONE 8(9): e73021. https://doi.org/10.1371/journal.pone.0073021 
dipy.denoise.nlmeans.
nlmeans
(arr, sigma, mask=None, patch_radius=1, block_radius=5, rician=True, num_threads=None)Nonlocal means for denoising 3D and 4D images
Parameters: 


Returns: 

References
[Descoteaux08]  Descoteaux, Maxim and WiestDaessle`, Nicolas and Prima, Sylvain and Barillot, Christian and Deriche, Rachid Impact of Rician Adapted NonLocal Means Filtering on HARDI, MICCAI 2008 
dipy.denoise.nlmeans.
nlmeans_3d
()Nonlocal means for denoising 3D images
Parameters: 


Returns: 

dipy.denoise.noise_estimate.
convolve
(input, weights, output=None, mode='reflect', cval=0.0, origin=0)Multidimensional convolution.
The array is convolved with the given kernel.
Parameters: 


Returns: 

See also
correlate
Notes
Each value in result is \(C_i = \sum_j{I_{i+kj} W_j}\), where W is the weights kernel, j is the nD spatial index over \(W\), I is the input and k is the coordinate of the center of W, specified by origin in the input parameters.
Examples
Perhaps the simplest case to understand is mode='constant', cval=0.0
,
because in this case borders (i.e. where the weights kernel, centered
on any one value, extends beyond an edge of input.
>>> a = np.array([[1, 2, 0, 0],
... [5, 3, 0, 4],
... [0, 0, 0, 7],
... [9, 3, 0, 0]])
>>> k = np.array([[1,1,1],[1,1,0],[1,0,0]])
>>> from scipy import ndimage
>>> ndimage.convolve(a, k, mode='constant', cval=0.0)
array([[11, 10, 7, 4],
[10, 3, 11, 11],
[15, 12, 14, 7],
[12, 3, 7, 0]])
Setting cval=1.0
is equivalent to padding the outer edge of input
with 1.0’s (and then extracting only the original region of the result).
>>> ndimage.convolve(a, k, mode='constant', cval=1.0)
array([[13, 11, 8, 7],
[11, 3, 11, 14],
[16, 12, 14, 10],
[15, 6, 10, 5]])
With mode='reflect'
(the default), outer values are reflected at the
edge of input to fill in missing values.
>>> b = np.array([[2, 0, 0],
... [1, 0, 0],
... [0, 0, 0]])
>>> k = np.array([[0,1,0], [0,1,0], [0,1,0]])
>>> ndimage.convolve(b, k, mode='reflect')
array([[5, 0, 0],
[3, 0, 0],
[1, 0, 0]])
This includes diagonally at the corners.
>>> k = np.array([[1,0,0],[0,1,0],[0,0,1]])
>>> ndimage.convolve(b, k)
array([[4, 2, 0],
[3, 2, 0],
[1, 1, 0]])
With mode='nearest'
, the single nearest value in to an edge in
input is repeated as many times as needed to match the overlapping
weights.
>>> c = np.array([[2, 0, 1],
... [1, 0, 0],
... [0, 0, 0]])
>>> k = np.array([[0, 1, 0],
... [0, 1, 0],
... [0, 1, 0],
... [0, 1, 0],
... [0, 1, 0]])
>>> ndimage.convolve(c, k, mode='nearest')
array([[7, 0, 3],
[5, 0, 2],
[3, 0, 1]])
dipy.denoise.noise_estimate.
estimate_sigma
(arr, disable_background_masking=False, N=0)Standard deviation estimation from local patches
Parameters: 


Returns: 

dipy.denoise.noise_estimate.
piesno
(data, N, alpha=0.01, l=100, itermax=100, eps=1e05, return_mask=False)Probabilistic Identification and Estimation of Noise (PIESNO).
Parameters: 


Returns: 

References
[1]  Koay CG, Ozarslan E and Pierpaoli C. 
“Probabilistic Identification and Estimation of Noise (PIESNO): A selfconsistent approach and its applications in MRI.” Journal of Magnetic Resonance 2009; 199: 94103.
[2]  Koay CG, Ozarslan E and Basser PJ. 
“A signal transformational framework for breaking the noise floor and its applications in MRI.” Journal of Magnetic Resonance 2009; 197: 108119.
dipy.denoise.non_local_means.
nlmeans_block
()NonLocal Means Denoising Using Blockwise Averaging
Parameters: 


Returns: 

References
dipy.denoise.non_local_means.
non_local_means
(arr, sigma, mask=None, patch_radius=1, block_radius=5, rician=True)Parameters: 


Returns: 

References
[Coupe08]  P. Coupe, P. Yger, S. Prima, P. Hellier, C. Kervrann, C. Barillot, An Optimized Blockwise Non Local Means Denoising Filter for 3D Magnetic Resonance Images, IEEE Transactions on Medical Imaging, 27(4):425441, 2008 
[Coupe11]  Pierrick Coupe, Jose Manjon, Montserrat Robles, Louis Collins. Adaptive Multiresolution NonLocal Means Filter for 3D MR Image Denoising IET Image Processing, Institution of Engineering and Technology, 2011 