Probability image lists should sum to one at every voxel. Smoothing or other common operations may break this constraint. This function allows one to easily ensure a list of proability images sums to one everywhere. It also allows one prioritize specific images in the probability set such that its probability is maintained while others are normalized with respect to the prioritized value. Will also set values less than zero, to zero.

renormalizeProbabilityImages(probs, mask, k = NA)

Arguments

probs

list of images

mask

image

k

which image, if any, to prioritize

Value

list is output

Examples

mat <- t( matrix( rnorm(4000),ncol=10) ) mask = makeImage( c(20,20), 1 ) plist = matrixToImages( mat, mask ) rplist<-renormalizeProbabilityImages( plist, mask ) rplist2<-renormalizeProbabilityImages( plist, mask , 2 )