R/writeFlirBin.R

Defines functions writeFlirBin

Documented in writeFlirBin

#' @export
#' 
writeFlirBin<-function(bindata, templookup=NULL, w, h, Interval, rootname)
  {
  # bindata should be supplied as a vector
  
  nf<-length(bindata)/w/h # quick count of the number of frames to be exported 
  binaryfilename<-paste0(rootname, "_W", w, "_H", h, "_F", nf, "_I", Interval, ".raw")
  if(is.null(templookup)){
    temperature=bindata
  }
  if(!is.null(templookup)){
    temperature<-templookup[bindata]
  }
  
  wb<-file(binaryfilename, "wb")
  writeBin(temperature, wb, size=4, endian="little") 
  close(wb)
 
}

Try the Thermimage package in your browser

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

Thermimage documentation built on Nov. 30, 2017, 9:01 a.m.