Learn R Programming

PET (version 0.5.1)

viewData: Display Several Images.

Description

This function prints 1 up to 8 images in a new window on the display or in a current window curWindow. The function uses the R function image to display the images. Note the conditions of this function.

Usage

viewData(Data, Title = NULL, curWindow = TRUE, 
         colors = gray((0:255)/255), s = 1)

Arguments

Data

Has to be a matrix or a list of matrices. One, two, up to eight image are possible.

Title

A character or a list of titles, that specify the title of the images. Note if Data and Title are of type list then length(Data) == length(Title). Defaults to Title=NULL (no title is uses).

curWindow

If curWindow=TRUE or curWindow=i then the current active window is used or the specified window i. In these cases the size of the corresponding window is used. Otherwise if curWindow=FALSE then a new window is open. Defaults to curWindow=TRUE.

colors

Corresponds to the parameter col of the function image. Defaults to colors = gray((0:255)/255).

s

Scaling parameter for the size of a new window. Defaults to s=1.

Value

Returns the current window.

Examples

Run this code
# NOT RUN {
P <- phantom()
R <- markPoisson(P)
viewData(list(P, R$Data, R$rData), list("Phantom", 
         "Marked Poisson Data", "Simulated PET Data"))
rm(P,R)
# }

Run the code above in your browser using DataLab