If you want julia (and this package) to use multi-threading for faster computation, you have to explicitly tell it to. You can do that either by starting julia with julia --thread auto
, or by setting the environment variable JULIA_NUM_THREADS
to auto
before starting julia. (This will use the total number of CPU threads available on your computer. Alternatively, you can specify a number of threads in place of auto
.)
julia> using Fibers
julia> aa = mri_read("/usr/local/freesurfer/dev/subjects/fsaverage/mri/aparc+aseg.mgz");
julia> fa = mri_read("/usr/local/freesurfer/dev/trctrain/hcp/MGH35_HCP_FA_template.nii.gz");
julia> disp(aa)
julia> disp(fa)
By default this will be an axial view, middle slice, first frame. See ?fs.show
for how to change what is displayed.
julia> show(aa)
julia> show(fa)
julia> mri_write(aa, "/tmp/aparc+aseg.nii.gz")
julia> mri_write(fa, "/tmp/MGH35_HCP_FA_template.mgz")
julia> ph = mri_read("/opt/nmrdata/PV-7.0.0/ayendiki/Phantom.cO1/5/");
julia> tr = trk_read("/usr/local/freesurfer/dev/trctrain/hcp/mgh_1001/syn/acomm.bbr.prep.trk");
julia> trk_write(tr, "/tmp/acomm.trk")
A gentle introduction to diffusion MRI
Development of this package is supported by the NIH National Institute of Neurologic Disorders and Stroke (grants UM1-NS132358, R01-NS119911, R01-NS127353).