Description Usage Arguments Details Author(s) See Also Examples
The ImageList
virtual class provides an formal abstraction for the imageData
slot of ImagingExperiment
objects. It is analogous to the Assays
classes from the SummarizedExperiment
package.
The ImageArrayList
virtual class specializes the ImageList
abstraction by assuming the array-like data elements all have conformable dimensions.
The SimpleImageList
and SimpleImageArrayList
subclasses are the default implementations.
The MSContinuousImagingSpectraList
and MSProcessedImagingSpectraList
classes are subclasses of SimpleImageArrayList
that make certain assumptions about how the underlying data elements are stored (i.e., either dense or sparse). They are intended to be used with mass spectrometry imaging data.
1 2 3 4 5 6 7 8 9 10 11 | # Create a SimpleImageList
ImageList(data)
# Create a SimpleImageArrayList
ImageArrayList(data)
# ImageArrayList class for 'continuous' (dense) MS imaging data
MSContinuousImagingSpectraList(data)
# ImageArrayList class for 'processed' (sparse) MS imaging data
MSProcessedImagingSpectraList(data)
|
data |
A |
ImageList
and ImageArrayList
objects have list-like semantics where the elements are array-like (i.e., have dim
), where ImageArrayList
makes the additional assumption that the array-like elements have identical dim
s for at least the first two dimensions.
The ImageList
class includes:
(1) The ImageList()
and ImageArrayList()
constructor functions.
(2) Lossless back-and-forth coercion from/to SimpleList
. The coercion method need not and should not check the validity of the returned object.
(3) length
, names
, names<-
, and `[[`
, `[[<-`
methods for ImageList
, as well as `[`
, `[<-`
, rbind
, and cbind
methods for ImageArrayList
.
See the documentation for the Assays
class in the SummarizedExperiment
package for additional details, as the implementation is quite similar, with the main difference being that all assumptions about the dimensions of the array-like data elements is contained in the ImageArrayList
subclass. This is intended to allow subclasses of the ImageList
class to handle images stored as arrays with non-conformable dimensions.
These classes are intended to eventually replace the ImageData
classes.
Kylie A. Bemis
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## create an ImageList object
data0 <- matrix(1:9, nrow=3)
data1 <- matrix(10:18, nrow=3)
data2 <- matrix(19:27, nrow=3)
idata <- ImageArrayList(list(d0=data0, d1=data1, d2=data2))
# subset all arrays at once
idataS <- idata[1:2,1:2]
all.equal(idataS[["d0"]], data0[1:2,1:2])
# combine over "column" dimension
idataB <- cbind(idata, idata)
all.equal(idataB[["d0"]], cbind(data0, data0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.