quantifyCBF | R Documentation |
Computes CBF from ASL - pasl or pcasl
quantifyCBF(perfusion, mask, parameters, M0val = NA, outlierValue = 0.02)
perfusion |
input asl matrix |
mask |
3D image mask (antsImage) |
parameters |
list with entries for sequence and m0 (at minimimum) |
M0val |
baseline M0 value (optional) |
outlierValue |
trim outliers by this fractional value (optional) |
a list is output with 3 types of cbf images
Avants BB, Kandel B, Duda JT
## Not run:
if (!exists("fn")) {
fn <- getANTsRData("pcasl")
}
# PEDS029_20101110_pcasl_1.nii.gz # high motion subject
asl <- antsImageRead(fn)
# image available at http://files.figshare.com/1701182/PEDS012_20131101.zip
pcasl.bayesian <- aslPerfusion(asl,
dorobust = 0., useDenoiser = 4, skip = 11, useBayesian = 1000,
moreaccurate = 0, verbose = T, maskThresh = 0.5
) # throw away lots of data
# user might compare to useDenoiser=FALSE
pcasl.parameters <- list(sequence = "pcasl", m0 = pcasl.bayesian$m0)
cbf <- quantifyCBF(
pcasl.bayesian$perfusion, pcasl.bayesian$mask,
pcasl.parameters
)
meancbf <- cbf$kmeancbf
print(mean(meancbf[pcasl.bayesian$mask == 1]))
antsImageWrite(meancbf, "temp.nii.gz")
pcasl.processing <- aslPerfusion(asl,
moreaccurate = 0,
dorobust = 0.95, useDenoiser = NULL, skip = 5, useBayesian = 0
)
# user might compare to useDenoiser=FALSE
pcasl.parameters <- list(sequence = "pcasl", m0 = pcasl.processing$m0)
cbf <- quantifyCBF(pcasl.processing$perfusion, pcasl.processing$mask, pcasl.parameters)
meancbf <- cbf$kmeancbf
print(mean(meancbf[pcasl.processing$mask == 1]))
antsImageWrite(meancbf, "temp2.nii.gz")
plot(meancbf, slices = "1x50x1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.