Learn R Programming

ANTsR (version 0.3.1)

antsMotionCorr: Motion Correction

Description

This program is a user-level registration application meant to utilize ITKv4-only classes. The user can specify any number of stages where a stage consists of -- a transform, an image metric, number of iterations, shrink factors, and smoothing sigmas for each level. Specialized for 4D time series data: fixed image is 3D, moving image should be the 4D time series. Fixed image is a reference space or time slice.

Usage

antsMotionCorr(...)

Arguments

...

antsMotionCorr parameters, as in ANTs. this is a direct call to the low level c++ and as such has non-standard parameters.

Value

0 -- Success 1 -- Failure

Examples

Run this code
# NOT RUN {
# boldfn <- getANTsRData( "pcasl" )
# bold <- antsImageRead( boldfn , 4 )
set.seed( 123 )
bold <- makeImage( c(10,10,10,20) , rnorm( 10*10*10*20)+1 )
bold <- iMath( bold, "PadImage", 5 )
aimg <- new("antsImage", "float", 3)
aimg <- new("antsImage", "float", 3)
mocoImg <- new("antsImage", "float", 4)
mocoParams <- new("antsMatrix", "double")
antsMotionCorr( list( d = 3 , a = bold , o = aimg ) )
antsMotionCorr( list( d = 3 ,
  o = list( mocoParams , mocoImg , aimg ) ,
  m = list( name = "MI" , aimg , bold , 1 , 32 , "Regular", 0.1 ) ,
  t = "Rigid[0.01]" , i = 25 ,
  u = 1 , e = 1 , s = 0 , f = 1 , n = 25 ) )
motiondf <- as.data.frame( mocoParams )
# }

Run the code above in your browser using DataLab