\HeaderA{imwr.imwd}{Inverse two-dimensional discrete wavelet transform.}{imwr.imwd}
\keyword{nonlinear}{imwr.imwd}
\keyword{smooth}{imwr.imwd}
\begin{Description}\relax
This functions performs the reconstruction stage of Mallat's pyramid algorithm (i.e. the inverse discrete wavelet transform) for images.
\end{Description}
\begin{Usage}
\begin{verbatim}
imwr.imwd(imwd, bc=imwd$bc, verbose=FALSE, ...) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{imwd}] An object of class `\code{\LinkA{imwd}{imwd}}'. This type of object is returned by `\code{\LinkA{imwd}{imwd}}'.
\item[\code{bc}] This argument specifies the boundary handling, it is best left to be the boundary handling specified by that in the supplied imwd (as is the default).
\item[\code{verbose}] If this argument is true then informative messages are printed detailing the computations to be performed
\item[\code{...}] any other arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Details of the algorithm are to be found in Mallat (1989). Similarly to the decomposition function, \code{\LinkA{imwd}{imwd}} the inverse algorithm works by applying many 1D reconstruction algorithms to the coefficients. The filters in these 1D reconstructions are incorporated in the supplied \code{\LinkA{imwd.object}{imwd.object}} and originally created by the \code{\LinkA{filter.select}{filter.select}} function in WaveThresh3.

This function is a method for the generic function \code{\LinkA{imwr}{imwr}} for class \code{\LinkA{imwd.object}{imwd.object}}. It can be invoked by calling \code{\LinkA{imwr}{imwr}} for an object of the appropriate class, or directly by calling imwr.imwd regardless of the class of the object.
\end{Details}
\begin{Value}
A matrix, of dimension determined by the original data set supplied to the initial decomposition (more precisely, determined by the \code{\LinkA{nlevels}{nlevels}} component of the \code{\LinkA{imwd.object}{imwd.object}}). This matrix is the highest resolution level of the reconstruction. If a \code{\LinkA{imwd}{imwd}} two-dimensional wavelet transform is followed immediately by a \code{\LinkA{imwr}{imwr}} inverse two-dimensional wavelet transform then the returned matrix will be exactly the same as the original image.
\end{Value}
\begin{Section}{RELEASE}
Version 3.5.3 Copyright Guy Nason 1994
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{imwd}{imwd}}, \code{\LinkA{imwd.object}{imwd.object}}, \code{\LinkA{imwr}{imwr}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
#
# Do a decomposition, then exact reconstruction
# Look at the error
#
# Test image is just some sort of  square matrix whose side length
# is a power of two.
#
#max( abs(imwr(imwd(test.image)) - test.image))
# [1] 1.014611e-11
\end{ExampleCode}
\end{Examples}

