Table of Contents

NAME

QccIMGImageCubeMean, QccIMGImageCubeShapeAdaptiveMean, QccIMGImageCubeVariance, QccIMGImageCubeShapeAdaptiveVariance, QccIMGImageCubeSubtractMean, QccIMGImageCubeAddMean - mean and variance operations on image cubes

SYNOPSIS

#include "libQccPack.h"

double QccIMGImageCubeMean(const QccIMGImageCube *image_cube);
double QccIMGImageCubeShapeAdaptiveMean(const QccIMGImageCube *image_cube, const QccIMGImageCube *alpha_mask);

double QccIMGImageCubeVariance(const QccIMGImageCube *image_cube);
double QccIMGImageCubeShapeAdaptiveVariance(const QccIMGImageCube *image_cube, const QccIMGImageCube *alpha_mask );

int QccIMGImageCubeSubtractMean(QccIMGImageCube *image_cube, double *mean, const QccSQScalarQuantizer *quantizer);
int QccIMGImageCubeAddMean(QccIMGImageCube *image_cube, double mean);

DESCRIPTION

QccIMGImageCubeMean() returns the mean of the volume array of image_cube.

QccIMGImageCubeShapeAdaptiveMean() performs a mean calculation similar to that of QccIMGImageCubeMean(), except that alpha_mask is assumed to denote regions that are "transparent" in image_cube and thus contain no valid voxel data. That is, QccIMGImageCubeShapeAdaptiveMean() skips over voxels in the mean calculation for which QccAlphaTransparent(3) returns non-zero when applied to alpha_mask at the current voxel location.

QccIMGImageCubeVariance() returns the variance of the volume array of image_cube.

QccIMGImageCubeShapeAdaptiveVariance() performs a variance calculation similar to that of QccIMGImageCubeVariance(), except that alpha_mask is assumed to denote regions that are "transparent" in image_cube and thus contain no valid voxel data.

QccIMGImageCubeSubtractMean() first calculates the mean of image_cube. If quantizer is not NULL, QccSQScalarQuantization(3) and QccSQInverseScalarQuantization(3) are called in succession to calculate a quantized reconstruction of the mean value, which is then subtracted from each voxel value of image_cube. On the other hand, if quantizer is NULL, then the calculated mean is subtracted directly from each voxel value of image_cube. If mean is not NULL, the value subtracted from image_cube, quantized or not, is returned in the location pointed to by mean.

QccIMGImageCubeAddMean() restores the mean that was removed by QccIMGImageCubeSubtractMean(). That is, mean is added to each voxel in image_cube.

RETURN VALUES

QccIMGImageCubeSubtractMean() and QccIMGImageCubeAddMean() return 0 on success and 1 on error; the other routines return the mean or variance value they calculate.

SEE ALSO

QccAlphaTransparent(3) , QccIMGImageCube(3) , QccPackIMG(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads