File: cbf_pcasl_robust_batch.R

package info (click to toggle)
ants 2.5.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,672 kB
  • sloc: cpp: 85,685; sh: 15,850; perl: 863; xml: 115; python: 111; makefile: 68
file content (19 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env Rscript
library( "ANTsR" )
library("extremevalues" )
args<-commandArgs(TRUE)

aslImg <- args[1]
outname <- args[2]


pasl <- antsImageRead( aslImg, 4 )

pcasl.processing <- aslPerfusion(pasl, moreaccurate=FALSE)
pcasl.parameters <- list( sequence="pcasl", m0=pcasl.processing$m0 )
cbf <- quantifyCBF( pcasl.processing$perfusion, pcasl.processing$mask, pcasl.parameters )
meancbf <- cbf$kmeancbf
cbfOverTime <- cbf$timecbf
print(outname)
antsImageWrite( meancbf, outname )