\HeaderA{curvPeaks}{Parse curv1Filter output}{curvPeaks}
\begin{Description}\relax
Parse the output of
\code{\LinkA{curv1Filter}{curv1Filter}} and find modes
and midpoints of the high-density regions. This function is considered
to be internal.
\end{Description}
\begin{Usage}
\begin{verbatim}

curvPeaks(x, dat, borderQuant = 0.01, n = 201, from, to, densities=NULL)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A
\code{\LinkA{multipleFilterResult}{multipleFilterResult}}
produced by a \code{curv1Filter} operation. 
\item[\code{dat}] The corresponding
\code{\LinkA{flowFrame}{flowFrame}}. 
\item[\code{borderQuant}] A numeric in \code{[0,1]} giving the extreme
quantiles for which high-density regions are ignored. 
\item[\code{n, from, to}] Arguments are passed on to
\code{\LinkA{density}{density}}. 
\item[\code{densities}] The optional y values of the density estimate
computed for the respective data.
\end{ldescription}
\end{Arguments}
\begin{Value}
A list with items

\begin{ldescription}
\item[\code{peaks }] x and y locations of the modes of the regions in the
density estimates. 
\item[\code{regions }] the left and right margins of the regions. 
\item[\code{midpoints }] the mean of \code{regions}. 
\item[\code{regPoints }] x and y locations of the outline of the significant
density regions. 
\item[\code{densFuns }] an approximation function of the density estimate 
\end{ldescription}
\end{Value}
\begin{Author}\relax
Florian Hahne
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{landmarkMatrix}{landmarkMatrix}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

data(GvHD)
tmp <- filter(GvHD[[10]], curv1Filter("FSC-H"))
res <-  flowStats:::curvPeaks(tmp, exprs(GvHD[[10]])[, "FSC-H"])

\end{ExampleCode}
\end{Examples}

