R/readClassTIF.R

Defines functions readClassTIF

Documented in readClassTIF

#' Read TIF file with classes
#'
#' @param file file
#' @param n number of classes
#'
#' @return array
#' @export
readClassTIF<-function(file,n=7)
{
  temp<-readTIF(file=file,native=FALSE,as.is=FALSE,channels=NULL)
  temp<-temp*n
  temp<-round(temp,0)
  temp[temp==0]<-NA
  return(temp)
}

Try the bioimagetools package in your browser

Any scripts or data that you put into this service are public.

bioimagetools documentation built on May 28, 2022, 5:06 p.m.