Learn R Programming

ANTsR (version 0.3.3)

iMathOps: iMathOps

Description

Examples, description and categorization of iMath operations.

Usage

data(iMathOps)

Arguments

Format

A data frame listing the following variables.

Examples

Run this code
i<-antsImageRead( getANTsRData('r16') , 2 )
roiImg<-getMask(i)
roiImg2<-iMath(roiImg,'ME',25)
if ( sum(roiImg==1) == sum(roiImg2==1)  ) stop("erosion failure")
roiImg2<-iMath(roiImg,'MD',25)
if ( sum(roiImg==1) == sum(roiImg2==1)  ) stop("dilation failure")
data( "iMathOps", package = "ANTsR", envir = environment() ) #
for ( j in c(1:nrow(iMathOps)) )
  {
  op <- as.character( iMathOps$Operation[j] )
  #  k  <- eval( parse( text = toString( iMathOps$Example[j] ) ) )
  }

Run the code above in your browser using DataLab