Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = "some data" | |
def aFunction(): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseInterface: | |
"""An interface implements a specific processing task. We can use existing | |
the interfaces and related machinery in Nipype. | |
""" | |
inputSpec = None | |
outputSpec = None | |
def run(self, **inputs): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This is a rough version of a workflow to download data, run bet and compute brain volumes. | |
""" | |
import os | |
import numpy as np | |
import nibabel as nib | |
import mintlabs | |
from traits.api import File, String, Int | |
from nipype.interfaces.base import (BaseInterfaceInputSpec, TraitedSpec, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dp1 | |
S'cerebellum' | |
p2 | |
cnumpy.core.multiarray | |
_reconstruct | |
p3 | |
(cnumpy | |
ndarray | |
p4 | |
(I0 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from dipy.reconst.dti import TensorModel | |
from dipy.data import read_stanford_labels | |
img, gtab, labels = read_stanford_labels() | |
data = img.get_data() | |
mask = labels.get_data() == 1 | |
model = TensorModel(gtab) | |
fit = model.fit(data, mask) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from dipy.reconst import shm | |
from dipy.data import default_sphere | |
theta, phi = default_sphere.theta, default_sphere.phi | |
sh_order = 6 | |
B_dipy, m_dipy, n_dipy = shm.real_sym_sh_basis(sh_order, theta, phi) | |
B_mrtrix, m_mrtrix, n_mrtrix = shm.real_sym_sh_mrtrix(sh_order, theta, phi) | |
n_coeff = len(n_dipy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from warnings import warn | |
import numpy as np | |
from dipy.reconst import shm | |
from dipy.core.geometry import cart2sphere | |
from dipy.tracking.local.interpolation import trilinear_interpolate4d | |
import nibabel as nib | |
from dipy.data import default_sphere |
NewerOlder