This file contains hidden or 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 python3 | |
| """INR-based whole-brain tractography on BIDS wmfod files. | |
| Pipeline per subject / session / FOD variant | |
| -------------------------------------------- | |
| 1. Train an ImageINR on the wmfod volume (skipped when checkpoint exists). | |
| 2. Export the checkpoint as a TorchScript ``.ts`` file (skipped when it | |
| already exists alongside the checkpoint). | |
| 3. Run :func:`~dipy.tracking.tracker.deterministic_tracking` with | |
| ``inr_model`` pointing at the ``.ts`` file. |
This file contains hidden or 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
| #/bin/env bash | |
| do_nonlinear_registration=false | |
| tmp_dir=$(mktemp -d -t tcktransform-XXXXXXXXXX) | |
| cd $tmp_dir | |
| # ____ 0. get DWI data and create two ODFs ____ | |
| for sub in sub-02 sub-03; do | |
| wget --quiet https://github.com/MRtrix3/script_test_data/raw/master/BIDS/"${sub}"/dwi/"${sub}"_dwi.bval |
This file contains hidden or 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 nibabel as nib | |
| import vtk | |
| import numpy as np | |
| import vtk.util.numpy_support | |
| import os | |
| def volume2surface(segmentation, out_ply, labels): | |
| for label in labels: | |
| print('Label', label) |