aoles / EBImage

:art: Image processing toolbox for R
71 stars 28 forks source link

Preserve subclass in `abind` Image-method #27

Closed aoles closed 7 years ago

aoles commented 7 years ago

The object returned by abind should be of the same class as inputs. The following should evaluate to TRUE.

ImageSubclass <- setClass ("ImageSubclass", contains = "Image", slots = c(foo = "character"))
x <- ImageSubclass(Image(), foo="bar")

identical(
  class(combine(x, x)),
  class(abind(x, x))
)

## FALSE