[R-sig-Geo] Rimage Package

Greg Snow Greg.Snow at imail.org
Tue Feb 26 18:57:34 CET 2008


I think that you are already close.

Assuming that you have already read in Redchannel, Greenchannel, and Bluechannel and they are each a 93x91 matrix, then the following should work for you:

> mat <- array(0, c(93,91,3) )
> mat[,,1] <- Redchannel
> mat[,,2] <- Greenchannel
> mat[,,3] <- Bluechannel
>
> plot(imagematrix(mat))

This creates an array of the correct size filled with 0's, then you replace 1 layer at a time, the commas without numbers indicate that you want to replace the entire layer (all rows all columns).  There is also an abind package that may simplify this (but the above is fairly simple and matches with what you already tried).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: PUJAN RAJ REGMI [mailto:regmi_pujan at hotmail.com] 
> Sent: Monday, February 25, 2008 6:36 PM
> To: Greg Snow; r-sig-geo at stat.math.ethz.ch
> Subject: Rimage Package
> 
> 
> Thanks a lot it gives me a wayout but I still want favour 
> from you.  Could you please explain how can i prepared three 
> mat file required for the following code?
> imagematrix(mat, type=NULL, ncol=dim(mat)[1], 
> nrow=dim(mat)[2], noclipping=FALSE) I have three R files 
> named as Redchannel, Greenchannel and Bluechannel with 93x 91 
> matrix where each coordinates have the reflectance values for 
> each pixels. I tried with following way but it didnt work 
> [mat[93,91,1]=c(Redchannel)],[mat[93,91,1]=c(Greenchannel)],[m
> at[93,91,1]=c(Bluechannel)]
> Looking forward to hearing form you
> Thanking you in advance
> Yours
> Pujan
> Belgium
> _________________________________________________________________
> Climb to the top of the charts! Play the word scramble 
> challenge with star power.
> http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmail
> textlink_jan
> 




More information about the R-sig-Geo mailing list