ImageList-class {Cardinal} | R Documentation

## ImageList: Abstract image data list

### Description

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.

### Usage

    # 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)

### Arguments

`data` | A `SimpleList` or `list` of array-like data elements, or an array-like object.

### Details

`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.

### Author(s)

Kylie A. Bemis

### See Also

`SimpleList`

### Examples

    ## 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))

[Package Cardinal version 2.4.0 Index]