ImageCalculatorOperator#
- class ddd_pylib.image_manip.ImageCalculatorOperator[source]#
Bases:
ImageOperatorApplies a binary operation between two images. The operation can be one of the following: Add, Subtract, Multiply, Divide, OR, AND, Difference, Minimum, Maximum, or Average. The data type of the output image is the one used by the main image (left hand of the operation). All operations are clipped to the data type for integer types. The AND and OR operations are numeric. They work as expected for booleans, but for numeric values, they return the first non-zero value (for OR) or the second value if the first is non-zero (for AND). The division is not secured against division by zero.
Methods
- getPrefix()[source]#
Prefix added to the input image name to generate the output image name.
- Return type:
- sanityCheck()[source]#
Simple check to prevent simple error, it may be implemented in subclasses to check more precise stuff