Cardinal icon indicating copy to clipboard operation
Cardinal copied to clipboard

Should `subsetPixels` support `SpectralImagingArrays`?

Open kuwisdelu opened this issue 1 month ago • 0 comments

It currently breaks without a helpful error message.

It is currently defined as:

x[, pixels(x, ..., env = parent.frame(1))]

We can support SpectralImagingArrays and similar classes with something like:

if ( is.null(length(dim(x))) ) {
    x[pixels(x, ..., env = parent.frame(1))]
} else {
    x[,pixels(x, ..., env = parent.frame(1))]
}

kuwisdelu avatar Jan 14 '25 18:01 kuwisdelu