iMathOps.RdExamples, description and categorization of iMath operations.
A data frame listing the following variables.
OperationName of operation
OperationTypeEnumerated type of the operation (filter, etc)
Parametersdescriptive parameters
Exampleworking example code
Descriptionfree text description
OutputDimensionalityChangeNA if not image, otherwise increment to output image dimensionality relative to input image
data(iMathOps)
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")
for (j in c(1:nrow(iMathOps)))
{
op <- as.character(iMathOps$Operation[j])
}