statisticsByBasisFunction: Get statistics for each basis function

Description Usage Arguments Value Examples

Description

Get statistics on pixel values in each basis function: mean of the pixel values (basis function coefficient), residual sum of squares using fitted coefficient, sum of pixel values.

Usage

1
statisticsByBasisFunction(ij, image, requestedStats)

Arguments

ij

ij coordinates of the basis function. Input is typically one item of the list of basis functions

image

image that statistics are to be calculated for

requestedStats

vector with each element being a requested statistic, e.g. c("coef","RSS"). Possible options are "numPixels" for the number of pixels in the input basis function, "coef" for the coefficient as described above, "RSS" for the residual sum of squares, "sum" for the sum of pixel values, and "max" and "min" for the maximum and minimum pixel values.

Value

A list with the requested statistics in the order provided.

Examples

1
2
3
basis3 <- getBasisFunctions(3)
stats <- statisticsByBasisFunction(basis3[[2]],
         matrix(1:9, nrow = 3), c("numPixels", "coef"))

xhtai/cartridges documentation built on June 1, 2019, 2:58 p.m.