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
""" | |
Compute the TSNR of a bunch of nifti files and generate the equivalent nifti | |
SNR 3Ds. | |
Depends on nibabel, matplotlib and scipy | |
""" | |
import os |
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 script takes the raw dicoms as they come off the scanner, | |
converts to nifti and runs FSL motion correction. | |
Also makes a plot of the motion correction parameters. | |
Depends on matplotlib, FSL, dcm2nii | |
""" |
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 warnings | |
import numpy as np | |
import scipy.linalg as la | |
class Tensor(object): | |
""" | |
Represent a diffusion tensor. | |
""" |
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 | |
import tensor as ozt | |
# Global constants for this module: | |
AD = 1.5 | |
RD = 0.5 | |
# This converts b values from the data, so that it matches the units of ADC we |
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
function Ymn = spherical_harmonics(degree, order, theta, phi) | |
% Compute the spherical harmonics of given degree and order at theta,phi | |
% | |
% Parameters | |
% ---------- | |
% degree: int, the degree of the underlying Legendre polynomial | |
% order: int, the order of the r | |
% | |
% theta: bounded between 0 and pi |
This file has been truncated, but you can view the full file.
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 | |
import sklearn.linear_model as lm | |
X = np.array([[ -2.18252949e-01, -8.21949578e-02, -4.64055457e-02, | |
-1.78405908e-01, -1.93863740e-01, 5.30667625e-02, | |
1.83851107e-01, 1.23426449e-01, 1.97396315e-01, | |
-2.12615837e-01, 7.06452283e-02, -1.94509405e-01, | |
-9.77929516e-02, 2.07135018e-01, -3.40368338e-02, | |
2.02970673e-01, -2.28669466e-01, 4.17398420e-02, | |
1.80163132e-01, 3.24254938e-02, -2.41198452e-03, |
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 __future__ import division | |
from warnings import warn | |
import numpy as np | |
from .recspeed import local_maxima, remove_similar_vertices, _filter_peaks | |
from ..core.onetime import auto_attr | |
from dipy.core.sphere import unique_edges, unit_icosahedron, HemiSphere | |
#Classes OdfModel and OdfFit are using API ReconstModel and ReconstFit from .base | |
default_sphere = HemiSphere.from_sphere(unit_icosahedron.subdivide(3)) |
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
{ | |
"metadata": { | |
"name": "TensorModel" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"metadata": { | |
"name": "std_bias" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
OlderNewer