bwApply {tofsims} | R Documentation |
bwApply allow to get new object from a black / white matrix All NZs at black positions will be taken
bwApply(object, bwMatrix) ## S4 method for signature 'MassSpectra,matrix' bwApply(object, bwMatrix)
object |
object of class MassImage |
bwMatrix |
matrix with boolean or numeric 1 and 0 |
object of class MassImage multiplied with B/W matrix
library(tofsimsData) data(tofsimsData) testImage <- PCAnalysis(testImage, nComp = 2) library(EBImage) mask<-thresh(imageMatrix(analysis(testImage,noAccess = 1),comp = 1), w = 15, h = 15) #inverse of mask mask <- (mask-1)^2 par(mfcol=c(1,2), oma=c(0,0,0,0), mar=c(0,0,0,0)) image(testImage) image(bwApply(testImage, mask))