## Not run:
# ## Examples of synthetized voxel diffusion glyphs
# ## ODF glyphs, and vMF fiber orientation mapping
# ## noise-free simulations and vMF estimation by GQI and QBI
# b <- 3000; angles <- c(20,110)
# simulglyph.vmf(angles=angles,b=b, gdi="gqi")
# simulglyph.vmf(angles=angles,b=b, gdi="gqi", logplot=FALSE)
# simulglyph.vmf(angles=angles,b=b, gdi="gqi2")
# simulglyph.vmf(angles=angles,b=b, gdi="gqi2", logplot=FALSE)
# ## test reconstruction with aniso factor
# simulglyph.vmf(angles=angles,b=b, gdi="gqi", aniso=0.5)
# ## Spherical harmonics model
# simulglyph.vmf(angles=angles,b=b, gdi="sph")
# simulglyph.vmf(angles=angles,b=b, gdi="sph", aniso=0.5)
# ## plot diffusion signal with "logplot=FALSE"
# angles <- 45; b <- 1500
# simulglyph.vmf(angles=angles,b=b, gdi="gqi", logplot=FALSE)
# simulglyph.vmf(angles=angles,b=b, gdi="gqi2", logplot=FALSE)
# ## 2 direction, lower crossing-angles, higher b
# angles <- c(20,80); b <- 6000
# simulglyph.vmf(angles=angles,b=b, gdi="gqi")
# simulglyph.vmf(angles=angles,b=b, gdi="sph")
# ## 2 direction, different volume fractions
# simulglyph.vmf(angles=angles, b=b, wi=c(0.7, 0.3), clusterthr=0.4)
# ## 2 direction, low croosing angle
# angles <- c(20,65); b <- 6000
# simulglyph.vmf(angles=angles,b=b)
# ## 3 directions
# angles <- c(20,80,140); b <- 3000
# simulglyph.vmf(angles=angles,b=b)
# # 3 directions
# angles <- c(0,60,120); b <- 3000
# simulglyph.vmf(angles=angles,b=b)
# # 3 directions, different weights
# simulglyph.vmf(angles=angles,b=b, wi=c(0.25,0.25,0.5), clusterthr=0.4)
# ##------------------
# ## noisy simulations and vMF estimation by GQI and QBI
# b <- 3000; sigma <- 0.033
# angles <- c(20,110)
# simulglyph.vmf(angles=angles,b=b, sigma=sigma, gdi="gqi")
# simulglyph.vmf(angles=angles,b=b, sigma=sigma, gdi="sph")
# # 2 direction, lower crossing-angles, higher b
# angles <- c(20,80)
# simulglyph.vmf(angles=angles,b=b, sigma=sigma)
# ## 2 direction, low croosing angle
# angles <- c(20,65)
# simulglyph.vmf(angles=angles,b=b, sigma=sigma)
# # 3 directions
# angles <- c(20,80,140)
# simulglyph.vmf(angles=angles,b=b, sigma=sigma)
# # 3 directions
# angles <- c(0,60,120)
# simulglyph.vmf(angles=angles,b=b, sigma=sigma)
# ##------------------
# ## speeded up approximations: hardmax and common kappa
# ## 2 direction, low croosing angle
# b <- 4000; angles <- c(20,65)
# simulglyph.vmf(angles=angles,b=b, clusterthr=0.4,
# E="hardmax", kappa = list(common = TRUE))
# ## 3 directions, different weights
# b <- 6000; angles <- c(0,60,120)
# simulglyph.vmf(angles=angles,b=b, wi=c(0.25,0.25,0.5),
# clusterthr=0.4, E="hardmax", kappa = list(common = TRUE))
# ## hardmax; numeric kappa
# simulglyph.vmf(angles=angles,b=b, wi=c(0.25,0.25,0.5),
# clusterthr=0.4, E="hardmax", kappa = 40)
# ## End(Not run)
Run the code above in your browser using DataLab