Reading and Parsing VTC/VOI files in R

vtc.r (2005/01/04)

R code to parse and read VTC and BrainVoyager VOI files and support for filtering voxels and ROIs from VTC files. Code by Hedderik van Rijn and Simone A. Sprenger. See the header of the vtc.r file for some documentation. Please double check the outcomes of this script with output from a program that you trust as I've only checked this script on datafiles from one scanner/setup.

A short example and resulting plots:

  vtc <- vtc.init("test.vtc",T)
  str(vtc)
  
  x11(":0")
  par(ask=T)
  ## Plot a single voxel:
  plot(vtc.get.voxel(vtc,128,128,128),type="l")

  ## Plot three regions of interest:
  plot(vtc.get.roi(vtc,vtc.read.BV.voi.file("rois.voi","prefrontal 1"))
       ,type="l",col="red",ylim=c(400,830))
  lines(vtc.get.roi(vtc,vtc.read.BV.voi.file("rois.voi","prefrontal 2"))
        ,type="l",col="blue")
  lines(vtc.get.roi(vtc,vtc.read.BV.voi.file("rois.voi","prefrontal 3"))
        ,type="l",col="green")
Last modified: Tue Jan 4 14:15:32 CET 2005
Creative Commons License This work is licensed under a Creative Commons License.