VTK  9.4.20241118
vtkImageLogic.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkImageLogic_h
16#define vtkImageLogic_h
17
18// Operation options.
19#define VTK_AND 0
20#define VTK_OR 1
21#define VTK_XOR 2
22#define VTK_NAND 3
23#define VTK_NOR 4
24#define VTK_NOT 5
25#define VTK_NOP 6
26
27#include "vtkImagingMathModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class VTKIMAGINGMATH_EXPORT vtkImageLogic : public vtkThreadedImageAlgorithm
32{
33public:
34 static vtkImageLogic* New();
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
42 vtkSetMacro(Operation, int);
43 vtkGetMacro(Operation, int);
44 void SetOperationToAnd() { this->SetOperation(VTK_AND); }
45 void SetOperationToOr() { this->SetOperation(VTK_OR); }
46 void SetOperationToXor() { this->SetOperation(VTK_XOR); }
47 void SetOperationToNand() { this->SetOperation(VTK_NAND); }
48 void SetOperationToNor() { this->SetOperation(VTK_NOR); }
49 void SetOperationToNot() { this->SetOperation(VTK_NOT); }
51
53
56 vtkSetMacro(OutputTrueValue, double);
57 vtkGetMacro(OutputTrueValue, double);
59
63 virtual void SetInput1Data(vtkDataObject* input) { this->SetInputData(0, input); }
64
68 virtual void SetInput2Data(vtkDataObject* input) { this->SetInputData(1, input); }
69
70protected:
72 ~vtkImageLogic() override = default;
73
76
78 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
79 int id) override;
80 int FillInputPortInformation(int port, vtkInformation* info) override;
81
82private:
83 vtkImageLogic(const vtkImageLogic&) = delete;
84 void operator=(const vtkImageLogic&) = delete;
85};
86
87VTK_ABI_NAMESPACE_END
88#endif
general representation of visualization data
void SetInputData(vtkDataObject *)
Assign a data object as input.
topologically and geometrically regular array of data
And, or, xor, nand, nor, not.
static vtkImageLogic * New()
void SetOperationToXor()
Set/Get the Operation to perform.
virtual void SetInput2Data(vtkDataObject *input)
Set the Input2 of this filter.
double OutputTrueValue
void SetOperationToNor()
Set/Get the Operation to perform.
void SetOperationToNand()
Set/Get the Operation to perform.
void SetOperationToAnd()
Set/Get the Operation to perform.
void SetOperationToOr()
Set/Get the Operation to perform.
~vtkImageLogic() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
virtual void SetInput1Data(vtkDataObject *input)
Set the Input1 of this filter.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetOperationToNot()
Set/Get the Operation to perform.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
#define VTK_NAND
#define VTK_AND
#define VTK_XOR
#define VTK_NOR
#define VTK_OR
#define VTK_NOT