Section: Visualization Toolkit Imaging Classes
To create an instance of class vtkImageMathematics, simply invoke its constructor as follows
obj = vtkImageMathematics
obj is an instance of the vtkImageMathematics class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkImageMathematics = obj.NewInstance ()
vtkImageMathematics = obj.SafeDownCast (vtkObject o)
obj.SetOperation (int ) - Set/Get the Operation to perform.
int = obj.GetOperation () - Set/Get the Operation to perform.
obj.SetOperationToAdd () - Set each pixel in the output image to the sum of the corresponding pixels
in Input1 and Input2.
obj.SetOperationToSubtract () - Set each pixel in the output image to the difference of the corresponding pixels
in Input1 and Input2 (output = Input1 - Input2).
obj.SetOperationToMultiply () - Set each pixel in the output image to the product of the corresponding pixels
in Input1 and Input2.
obj.SetOperationToDivide () - Set each pixel in the output image to the quotient of the corresponding pixels
in Input1 and Input2 (Output = Input1 / Input2).
obj.SetOperationToConjugate ()
obj.SetOperationToComplexMultiply ()
obj.SetOperationToInvert () - Set each pixel in the output image to 1 over the corresponding pixel
in Input1 and Input2 (output = 1 / Input1). Input2 is not used.
obj.SetOperationToSin () - Set each pixel in the output image to the sine of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToCos () - Set each pixel in the output image to the cosine of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToExp () - Set each pixel in the output image to the exponential of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToLog () - Set each pixel in the output image to the log of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToAbsoluteValue () - Set each pixel in the output image to the absolute value of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToSquare () - Set each pixel in the output image to the square of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToSquareRoot () - Set each pixel in the output image to the square root of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToMin () - Set each pixel in the output image to the minimum of the corresponding pixels
in Input1 and Input2. (Output = min(Input1, Input2))
obj.SetOperationToMax () - Set each pixel in the output image to the maximum of the corresponding pixels
in Input1 and Input2. (Output = max(Input1, Input2))
obj.SetOperationToATAN () - Set each pixel in the output image to the arctangent of the corresponding pixel
in Input1. Input2 is not used.
obj.SetOperationToATAN2 ()
obj.SetOperationToMultiplyByK () - Set each pixel in the output image to the product of ConstantK with the
corresponding pixel in Input1. Input2 is not used.
obj.SetOperationToAddConstant () - Set each pixel in the output image to the product of ConstantC with the
corresponding pixel in Input1. Input2 is not used.
obj.SetOperationToReplaceCByK () - Find every pixel in Input1 that equals ConstantC and set the corresponding pixels
in the Output to ConstantK. Input2 is not used.
obj.SetConstantK (double ) - A constant used by some operations (typically multiplicative). Default is 1.
double = obj.GetConstantK () - A constant used by some operations (typically multiplicative). Default is 1.
obj.SetConstantC (double ) - A constant used by some operations (typically additive). Default is 0.
double = obj.GetConstantC () - A constant used by some operations (typically additive). Default is 0.
obj.SetDivideByZeroToC (int ) - How to handle divide by zero. Default is 0.
int = obj.GetDivideByZeroToC () - How to handle divide by zero. Default is 0.
obj.DivideByZeroToCOn () - How to handle divide by zero. Default is 0.
obj.DivideByZeroToCOff () - How to handle divide by zero. Default is 0.
obj.SetInput1 (vtkDataObject in) - Set the two inputs to this filter. For some operations, the second input
is not used.
obj.SetInput2 (vtkDataObject in)