\HeaderA{image.dev}{Image for Device}{image.dev}
\keyword{device}{image.dev}
\begin{Description}\relax
Creates an image for each sample for the selected device.
\end{Description}
\begin{Usage}
\begin{verbatim}
image.dev(x, bg = FALSE, transfo = log2, col = gray((0:64)/64), names = "namepart", xlab = "", ylab = "", mar = c(1, 1, 2, 1), dev = "screen", outfile = "Image", w = 540, h = 540, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] object of class \code{\LinkA{DataTreeSet}{DataTreeSet}}.
\item[\code{bg}] logical. If \code{FALSE}, intensities from slot \code{data} will be used;
if \code{TRUE}, background intensities from slot \code{bgrd} will be used.
\item[\code{transfo}] a valid function to transform the data, usually \dQuote{log2}, or \dQuote{0}.
\item[\code{col}] color range for intensities.
\item[\code{names}] optional vector of sample names.
\item[\code{xlab}] a title for the x axis.
\item[\code{ylab}] a title for the y axis.
\item[\code{mar}] plot margins.
\item[\code{dev}] graphics device to plot to, i.e. one of \dQuote{screen}, \dQuote{jpeg},\dQuote{png},
\dQuote{pdf} or \dQuote{ps}.
\item[\code{outfile}] the name of the output file.
\item[\code{w}] the width of the device in pixels.
\item[\code{h}] the height of the device in pixels.
\item[\code{...}] optional arguments to be passed to \code{image}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Creates an image for each array for the selected graphics device.

For \code{bgrd=TRUE} the distribution of the computed background intensities will be shown;
this can be useful to see potential density gradients caused by hybridization conditions.
For the computation of background intensities see function \code{\LinkA{bgcorrect}{bgcorrect}};
it is suggested to use \code{\LinkA{bgcorrect.mas4}{bgcorrect.mas4}} to identify density gradients.

For \code{names=NULL} full column names of slot \code{data} will be displayed while for 
\code{names="namepart"} column names will be displayed without name extension. If \code{names}
is a vector of column names, only these columns will displayed as image.
\end{Details}
\begin{Note}\relax
Data must first be attached to class \code{\LinkA{DataTreeSet}{DataTreeSet}} using method \code{\LinkA{attachInten}{attachInten}}.
\end{Note}
\begin{Author}\relax
Christian Stratowa
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{image-methods}{image.Rdash.methods}}, \code{\LinkA{image}{image}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## first, load ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

## need to attach scheme mask and data
data.test3 <- attachMask(data.test3)
data.test3 <- attachInten(data.test3)

if (interactive()) {
image.dev(data.test3)
}

## to avoid memory comsumption of R remove data:
data.test3 <- removeInten(data.test3)
data.test3 <- removeMask(data.test3)
\end{ExampleCode}
\end{Examples}

