kwneuro.dwi module¶
- class kwneuro.dwi.Dwi(volume, bval, bvec)¶
Bases:
objectA diffusion weighted image.
- Parameters:
volume (
VolumeResource)bval (
BvalResource)bvec (
BvecResource)
- bval: BvalResource¶
The DWI b-values
- bvec: BvecResource¶
The DWI b-vectors
- compute_mean_b0()¶
Compute the mean of the b=0 images of a DWI.
- Return type:
- static concatenate(dwis)¶
Concatenate a list of `Dwi`s into a single (loaded) DWI.
The affine and metadata of the first Dwi in the list will be used to concatenate volumes.
- estimate_dti(mask=None)¶
Estimate diffusion tensor image from this DWI
- Parameters:
mask (
VolumeResource|None)- Return type:
- estimate_noddi(mask=None, dpar=0.0017, n_kernel_dirs=500)¶
Estimate NODDI model parameters from this DWI. See Noddi.estimate_from_dwi for details.
- Parameters:
mask (
VolumeResource|None)dpar (
float)n_kernel_dirs (
int)
- Return type:
- extract_brain()¶
Extract brain mask. This is meant to be convenient rather than efficient. Using this in a loop could result in unnecessary repetition of file I/O operations. For efficiency, see kwneuro.masks.brain_extract_batch.
- Return type:
- get_gtab()¶
Get the GradientTable for this DWI.
- Return type:
GradientTable
- load()¶
Load any on-disk resources into memory and return a Dwi with all loadable resources loaded.
- Return type:
- save(path, basename)¶
Save all resources to disk and return a Dwi with all resources being on-disk.
- Parameters:
- Return type:
Returns: A Dwi with its internal resources being on-disk.
- volume: VolumeResource¶
The DWI image volume. It is assumed to be a 4D volume, with the first three dimensions being spatial and the final dimension indexing the diffusion weightings.