28 #ifndef vtkImageMathematics_h
29 #define vtkImageMathematics_h
33 #define VTK_SUBTRACT 1
34 #define VTK_MULTIPLY 2
48 #define VTK_MULTIPLYBYK 16
50 #define VTK_CONJUGATE 18
51 #define VTK_COMPLEX_MULTIPLY 19
52 #define VTK_REPLACECBYK 20
54 #include "vtkImagingMathModule.h"
68 vtkSetMacro(Operation,
int);
69 vtkGetMacro(Operation,
int);
190 vtkSetMacro(ConstantK,
double);
191 vtkGetMacro(ConstantK,
double);
198 vtkSetMacro(ConstantC,
double);
199 vtkGetMacro(ConstantC,
double);
273 int outExt[6],
int threadId)
override;
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
void SetOperationToATAN()
Set each pixel in the output image to the arctangent of the corresponding pixel in Input1...
void SetOperationToAdd()
Set each pixel in the output image to the sum of the corresponding pixels in Input1 and Input2...
void SetOperationToSquareRoot()
Set each pixel in the output image to the square root of the corresponding pixel in Input1...
void SetOperationToSin()
Set each pixel in the output image to the sine of the corresponding pixel in Input1.
void SetOperationToATAN2()
void SetOperationToLog()
Set each pixel in the output image to the log of the corresponding pixel in Input1.
virtual void SetInput2Data(vtkDataObject *in)
Set the inputs to this filter.
void SetOperationToMin()
Set each pixel in the output image to the minimum of the corresponding pixels in Input1 and Input2...
int GetNumberOfInputs()
Get the number of inputs to this filter.
void SetOperationToDivide()
Set each pixel in the output image to the quotient of the corresponding pixels in Input1 and Input2 (...
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
void SetOperationToConjugate()
void SetOperationToComplexMultiply()
void SetInputData(vtkDataObject *)
Assign a data object as input.
void SetInputData(vtkDataObject *input)
Assign a data object as input.
Proxy object to connect input/output ports.
void SetOperationToAbsoluteValue()
Set each pixel in the output image to the absolute value of the corresponding pixel in Input1...
Generic filter that has one input.
a simple class to control print indentation
topologically and geometrically regular array of data
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOperationToSubtract()
Set each pixel in the output image to the difference of the corresponding pixels in Input1 and Input2...
void SetOperationToReplaceCByK()
Find every pixel in Input1 that equals ConstantC and set the corresponding pixels in the Output to Co...
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void SetOperationToExp()
Set each pixel in the output image to the exponential of the corresponding pixel in Input1...
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method.
void SetOperationToMultiplyByK()
Set each pixel in the output image to the product of ConstantK with the corresponding pixel in Input1...
vtkDataObject * GetInput()
Get one input to this filter.
void SetOperationToSquare()
Set each pixel in the output image to the square of the corresponding pixel in Input1.
Add, subtract, multiply, divide, invert, sin, cos, exp, log.
void SetOperationToMax()
Set each pixel in the output image to the maximum of the corresponding pixels in Input1 and Input2...
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
virtual void SetInputConnection(vtkAlgorithmOutput *input) override
Set the inputs to this filter.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOperationToInvert()
Set each pixel in the output image to 1 over the corresponding pixel in Input1 and Input2 (output = 1...
void SetOperationToMultiply()
Set each pixel in the output image to the product of the corresponding pixels in Input1 and Input2...
general representation of visualization data
vtkTypeBool DivideByZeroToC
void SetOperationToCos()
Set each pixel in the output image to the cosine of the corresponding pixel in Input1.
virtual void SetInput1Data(vtkDataObject *in)
Set the inputs to this filter.
#define VTK_COMPLEX_MULTIPLY
virtual void AddInputData(vtkDataObject *)
Assign a data object as input.
void SetOperationToAddConstant()
Set each pixel in the output image to the product of ConstantC with the corresponding pixel in Input1...