Learn R Programming

ANTsR (version 1.0)

plotANTsImage: Plotting an image slice or multi-slice with optional color overlay.

Description

This is a plotting utility for antsImage types with a background and color overlay option. Useful for displaying statistical results overlaid on a background image.

Usage

plotANTsImage( myantsimage , functional=NA, color="red", axis=1, slices="1x1x1" , threshold="1x0", quality=NA )

Arguments

myantsimage

the reference image on which to overlay

color = <string>

the color for the overlay , e.g c("blue","red") length of this list should match the image list

functional

list of the images to use as overlays

axis = <value>

character ... the axis to slice (1 , 2 or 3)

slices = <string>

character, the slices to overlay written as 10x20x3 where 10x20 is the range and 3 is the increment, for multislice display

threshold = <string>

character, we overlay values above/below this threshold : of form LOxHI

quality = <value>

integer quality magnification factor 1 => large (e.g. 10)

outname="figx.jpg"

output name if you want to write the result to a file

Value

output is plot to standard R window

or

1 -- Failure

Examples

Run this code
# NOT RUN {
# in 2D
  plotANTsImage(myantsimage=img,functional=funcimg,threshold="50x150",color="red",axis=1)
# in 3D
  plotANTsImage(myantsimage=img,functional=img,threshold="50x150",slices="10x20x3",color="red",axis=0)
# }

Run the code above in your browser using DataLab