## S2 grid
s2 <- s2tessel.zorder(depth=3)
g0 <- s2$pc
## synthetize diffusion signal (two crossing fibres)
open3d()
angles=c(20,100); b=3000
S <- synthfiberss2z(g0=g0, angles=angles, b=b)
## synthetize signal with different volume fractions
S <- synthfiberss2z(g0=g0, angles=angles, b=b, wi=c(0.7,0.3))
## synthesize diffusion signal (three crossing fibres)
angles <- c(0,60,120); b <- 3000
S <- synthfiberss2z(g0=g0, angles=angles, b=b)Run the code above in your browser using DataLab