import dipy.tracking.streamline as dts

oriented_cst_l = dts.orient_by_streamline(cst_l, standard_cst_l,
                                          affine=transform)
oriented_af_l = dts.orient_by_streamline(af_l, standard_af_l,
                                         affine=transform)


"""
Read volumetric data from an image corresponding to this subject.

For the purpose of this, we've extracted only the FA within the bundles in question,
but in real use, this is where you would add the FA map of your subject.
"""

files, folder = dpd.fetch_bundle_fa_hcp()

import nibabel as nib
img = nib.load(op.join(folder, "hcp_bundle_fa.nii.gz"))
fa = img.get_fdata()


"""
Calculate weights for each bundle:
"""

import dipy.stats.analysis as dsa

w_cst_l = dsa.gaussian_weights(oriented_cst_l)
w_af_l = dsa.gaussian_weights(oriented_af_l)
Example #2
0
import dipy.tracking.streamline as dts

oriented_cst_l = dts.orient_by_streamline(cst_l, standard_cst_l,
                                          affine=transform)
oriented_af_l = dts.orient_by_streamline(af_l, standard_af_l,
                                         affine=transform)


"""
Read volumetric data from an image corresponding to this subject.

For the purpose of this, we've extracted only the FA within the bundles in question,
but in real use, this is where you would add the FA map of your subject.
"""

files, folder = dpd.fetch_bundle_fa_hcp()

import nibabel as nib
img = nib.load(op.join(folder, "hcp_bundle_fa.nii.gz"))
fa = img.get_fdata()


"""
Calculate weights for each bundle:
"""

import dipy.stats.analysis as dsa

w_cst_l = dsa.gaussian_weights(oriented_cst_l)
w_af_l = dsa.gaussian_weights(oriented_af_l)