% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conversions.R
\name{cimg2im}
\alias{cimg2im}
\title{Convert cimg to spatstat im object}
\usage{
cimg2im(img, W = NULL)
}
\arguments{
\item{img}{an image of class cimg}

\item{W}{a spatial window (see spatstat doc). Default NULL}
}
\value{
an object of class im, or a list of objects of class im, or a list of lists of objects of class im
}
\description{
The spatstat library uses a different format for images, which have class "im". This utility converts a cimg object to an im object. spatstat im objects are limited to 2D grayscale images, so if the image has depth or spectrum > 1 a list is returned for the separate frames or channels (or both, in which case a list of lists is returned, with frames at the higher level and channels at the lower one).
}
\seealso{
im, as.im
}
\author{
Simon Barthelme
}
