File: cbf_pasl_robust_batch.R

package info (click to toggle)
ants 2.1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,656 kB
  • sloc: cpp: 84,137; sh: 11,419; perl: 694; xml: 115; makefile: 74; python: 48
file content (23 lines) | stat: -rwxr-xr-x 637 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env Rscript
library( "ANTsR" )
library("extremevalues" )
args<-commandArgs(TRUE)

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

#init <- cbf_pasl_robust( asl_img, m0_img )
#cbf <- cbf_pasl_quantify( init$delta, init$m0 )

pasl <- antsImageRead( aslImg, 4 )
m0 <- antsImageRead( m0Img, 3 )

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