[BioC] EBImage Sample code errors

Robert Baer rbaer at atsu.edu
Thu Jul 19 17:31:15 CEST 2012


On 7/18/2012 6:51 PM, Dan Tenenbaum wrote:
> On Wed, Jul 18, 2012 at 4:39 PM, Robert Baer <rbaer at atsu.edu> wrote:
>> On 7/18/2012 5:59 PM, Dan Tenenbaum wrote:
>>> On Wed, Jul 18, 2012 at 3:36 PM, Robert Baer <rbaer at atsu.edu> wrote:
>>>> I get the following errors when running the EBImage introductory sample
>>>> code:
>>>>
>>>>> ###################################################
>>>>> ### code chunk number 11: math2
>>>>> ###################################################
>>>>> lena4 = lena[299:376, 224:301]
>>>> Error in slot(lena, ".Data")[299:376, 224:301] :
>>>>      incorrect number of dimensions
>>>>> lena5 = lena>0.5
>>>>> lena6 = t(lena)
>>>> Error in t.default(lena) : argument is not a matrix
>>>>> print(median(lena))
>>>> [1] 0.3803922
>>>> Can any when help me understand what is going on?
>>>>
>>> Can you send the output of sessionInfo() after receiving this error?
>>> Dan
>>>
>> Sorry!  I should have done this in the first place :-(
>>
>>> sessionInfo()
>> R version 2.15.1 (2012-06-22)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>
>> locale:
>> [1] LC_COLLATE=English_United States.1252
>> [2] LC_CTYPE=English_United States.1252
>> [3] LC_MONETARY=English_United States.1252
>> [4] LC_NUMERIC=C
>> [5] LC_TIME=English_United States.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods base
>>
>> other attached packages:
>> [1] EBImage_3.12.0 abind_1.4-0
> Our Windows release build machine has the same sessionInfo() after
> loading EBImage, it builds this vignette just fine. So I wonder if it
> is a problem with the external dependencies GTK+ and ImageMagick. I
> assume you installed them as described here:
> http://bioconductor.org/packages/release/bioc/vignettes/EBImage/inst/doc/EBImage-installation.pdf
>
> What happens if you open a command window and type
>
> echo %PATH%
>
> also, what about this command:
>
> convert
Thanks for the useful ideas Dan, but I have not yet made useful progress.
To answer your follow-up queries:

C:\Users\rbaer>echo %path%
C:\GTK\bin;C:\Program Files 
(x86)\ImageMagick-6.7.8-Q16;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 
Files\ggobi;

Typing 'convert' at the command prompt produces an extensive list of 
what appear to be possible flags for imageMagick

I am using a 64-bit Windows 7 (Enterprise edition) OS but the 32-bit R 
when I get this error.  I think both the ImageMagick and GTK+ are 
designed for 32-bit, and should therefore match the R I'm using.

Just for clarification, the whole vignette runs just as expected EXCEPT 
for code chunk 11 where lena4 and lena6 are supposedly created and code 
chunk 12 when lena4 and lena6 are supposedly saved (because they didn't 
create.  lena5 works fine.  Both fail with the errors indicated above.  
The rest of the code runs and produces images as expected (or at least 
without error and with images appearing and/or getting saved).  lena6 is 
created in the vignette code as a transpose of lena (an "image" object) 
ostensibly because it is not a matrix.  It appears that this line of 
code is using t.default suggesting that this generic function doesn't 
have an "Image" method.  Should it?  Would this be a method supplied by 
EBImage or some other package?  This makes me suspect some sort of R 
issue, but I don't know enough about GTK+ or ImageMagick to eliminate 
issues there.

# Version notation.    EBImage_3.12.0 abind_1.4-0
# structure and class of the lena object that fails when I attempt to 
make lena4 & lena6 objects
 > str(lena)
Formal class 'Image' [package "EBImage"] with 2 slots
   ..@ .Data    : num [1:512, 1:512, 1:3] 0.537 0.537 0.537 0.533 0.541 ...
   ..@ colormode: int 2

 > class(lena)
[1] "Image"
attr(,"package")
[1] "EBImage"
 >

# The installation instructions provide the following:
# System Requirements    ImageMagick (>= 6.3.7), GTK+ (> 2.6)
# I have:
# ImageMagick 6.7.8-2 Q16(2012-07-01)
# GTk+ Runtime Environment 2.10.11-1
#
# The computer is a 64-bit windows 7 OS running R i386-pc-mingw32/i386 
(32-bit)



More information about the Bioconductor mailing list