Re: [R] Tif image to 8bit colour matrix.

2010-10-19 Thread Greg Snow
Look at the EBImage package from bioconductor. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Roger Gill > S

Re: [R] Tif image to 8bit colour matrix.

2010-10-19 Thread Michael Sumner
This requires the rgdal and sp packages to be installed, and assumes a 3-bandfile called image.tif ## (untested) library(rgdal) x <- readGDAL("image.tif") ## first band red <- as.image.SpatialGridDataFrame(x[1])$z ## second green <- as.image.SpatialGridDataFrame(x[2])$z ## third blue <- as.image