Table of Contents

Name

ccdmom - moment or accumulate along an axis of an image

Synopsis

ccdmom [parameter=value]

Description

ccdmom takes special moments (in position, or image intensity) along an axis of an image/cube. It can optionally also accumulate along the selected axis.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
Input image file. No default.
out=
Output image file. No default.
axis=
Axis to take moment along (1=x 2=y 3=z) [Default: 1]
mom=
Moment to take [-2,-1,0,1,2,3..] Compute either the sum (0), mean (1) , dispersion (2) , or peak location (3) . Negative numbers also have a special meaning. -1 computes the average intensity along the axis, where -2 computes the dispersion around the mean value. [Default: 0].
keep=t|f
Boolean value if to keep the moment axis. If you keep the axis (instead of compressing it), the values are replaced with the computed moment. This can be useful if you want to subtract an cube/image with the mean value along a certain axis. Only in this case (but see also cumulative=t below) will the output image have the same shape and dimension as the input image. [Default: f].
cumulative=t|f
Boolean value if the values should accumulate instead along the selected axis. The mom= keyword is ignored, and the input and output datasets will now have the same shape and dimension. [Default: f]

See Also

pvtrace(1NEMO)

Caveats

Cannot compute straight moments, e.g. the 2nd moment along an axis, such as e.g. snapgrid can do. This program only computes user friendly numbers (sum, mean, dispersion) and gives special meaning to negative values of mom= and axis=.

Files

src/image/misc/ccdmom.c

Author

Peter Teuben

Update History


09-jun-95    V0.1 Created    PJT
19-oct-95    V0.2 simple implementation of axis=3    PJT
12-dec-98    V0.3 finished mom=0,1,2 for all axes    PJT
31-dec-98    V0.4 added keep=    PJT
21-feb-01    V0.4a added mom=3, and fixed major bugs in computing moments    PJT
25-mar-01    V0.5 added mom=-1    PJT
18-oct-05    V0.6 added mom=-2 and cumulative option     PJT


Table of Contents