Hello Simon,

The method abind hasn't been overloaded in EBImage and returns an array,
instead of an Image object, and loses the "colormode " property, which is
needed by display() to render an image (since a multidimensional array
could represent either a sequence of grayscale images or a color image).
The array has to be recasted in an Image: the following code should work:

> display(Image(abind( lena, lena, along=1 ), colormode=Color))

It should be easy to overload abind in EBImage.

Cheers,

Greg

On Sat, Feb 9, 2013 at 4:58 AM, Simon Anders <anders@embl.de> wrote:

> Hi Andrzej (or anybody else who might know),
>
> if I have to Image objects with the same vertical size, how can I combine
> them into one wide Image object, with the two images placed next to each
> other?
>
> I tried the following:
>
>  library( EBImage)
>  lena <- readImage(system.file("images"**,
>      "lena-color.png", package="EBImage"))
>  display( abind( lena, lena, along=1 ) )
>
> This work, but Lena turns from colour to black&white.
>
> Thanks in advance
>   Simon
>
> > sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
>  [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8
>  [7] LC_PAPER=C                 LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] abind_1.4-0   EBImage_4.0.0
>
> loaded via a namespace (and not attached):
> [1] jpeg_0.1-2   png_0.1-4    tiff_0.1-3   tools_2.15.2
>
> ______________________________**_________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https://stat.ethz.ch/mailman/listinfo/bioconductor>
> Search the archives: http://news.gmane.org/gmane.**
> science.biology.informatics.**conductor<http://news.gmane.org/gmane.science.biology.informatics.conductor>
>

	[[alternative HTML version deleted]]

