Usage: cartoLinearComb.py [options]

Apply a formula to a set of homogeneous images or textures (homogeneous means
all of the same data type)

Options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output=OUTPUT
                        output volume
  -f FORMULA, --formula=FORMULA
                        image formula, ex: ( I1 * 2 + I2 * I3 ) / 1.2 . Image
                        (or other objects) can be named I1, I2... or image[1],
                        image[2] etc. Indices normally start at 1 (kind of
                        matlab-style) but can start at 0 if the -z option is
                        used. A formula is basically a python expression, thus
                        can use anything supported in python expressions. ex:
                        sum(images). Numpy may be used (as np), and numpy
                        results can be converted to volumes: np.asarray(I1) **
                        2, or np.sqrt(I1). 'image' is the list of images, with
                        index starting at either 1 or 0 (if -z is used).
                        'images' is also the list of images, with index
                        starting at 0. If -z is not used, 'image' contains an
                        additional first element, which is None: image[0] is
                        None, thus sum(image) will fail, whereas sum(images)
                        is OK.
  -i FILENAME, --input=FILENAME
                        input volume(s)
  -l, --lazy            use lazy reading and release of objects during the
                        formula evaluation. With this option, each image is
                        loaded when used, and released once one operation has
                        been performed with it. It allows to process large
                        lists of images without loading all of them in memory,
                        but will read them several times if they are used
                        several times in the formula. (see
                        aims.lazy_read_data.LasyReadData python class for
                        details)
  -t THREADS, --threads=THREADS
                        use threaded preloading when iterating over the list
                        of images (see
                        soma.aims.lazy_read_data.PreloadIterator python class
                        for details). Implies -l, and only useful when using
                        an iteration over the list of volumes, such as in the
                        formula "sum(image)". In such an iteration volumes in
                        the later iterations can be preloaded using threads,
                        making the process much faster. The number of threads
                        / preloads is specified with this option. 0 means
                        guess the number of CPUs of the current machine.
                        Default is 1: no thraading/preloading
  -z, --zero            start indexing images at index 0 (instead of 1 by
                        default): I0, I1 etc and image[0], image[1] etc.
