VTK
vtkImageLogic.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageLogic.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkImageLogic_h
28 #define vtkImageLogic_h
29 
30 
31 // Operation options.
32 #define VTK_AND 0
33 #define VTK_OR 1
34 #define VTK_XOR 2
35 #define VTK_NAND 3
36 #define VTK_NOR 4
37 #define VTK_NOT 5
38 #define VTK_NOP 6
39 
40 
41 
42 #include "vtkImagingMathModule.h" // For export macro
44 
45 class VTKIMAGINGMATH_EXPORT vtkImageLogic : public vtkThreadedImageAlgorithm
46 {
47 public:
48  static vtkImageLogic *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
56  vtkSetMacro(Operation,int);
57  vtkGetMacro(Operation,int);
58  void SetOperationToAnd() {this->SetOperation(VTK_AND);};
59  void SetOperationToOr() {this->SetOperation(VTK_OR);};
60  void SetOperationToXor() {this->SetOperation(VTK_XOR);};
61  void SetOperationToNand() {this->SetOperation(VTK_NAND);};
62  void SetOperationToNor() {this->SetOperation(VTK_NOR);};
63  void SetOperationToNot() {this->SetOperation(VTK_NOT);};
65 
67 
70  vtkSetMacro(OutputTrueValue, double);
71  vtkGetMacro(OutputTrueValue, double);
73 
77  virtual void SetInput1Data(vtkDataObject *input) { this->SetInputData(0,input);};
78 
82  virtual void SetInput2Data(vtkDataObject *input) { this->SetInputData(1,input);};
83 
84 protected:
85  vtkImageLogic();
87 
88  int Operation;
90 
91  void ThreadedRequestData (vtkInformation* request,
92  vtkInformationVector** inputVector,
93  vtkInformationVector* outputVector,
94  vtkImageData ***inData, vtkImageData **outData,
95  int ext[6], int id);
97 
98 private:
99  vtkImageLogic(const vtkImageLogic&) VTK_DELETE_FUNCTION;
100  void operator=(const vtkImageLogic&) VTK_DELETE_FUNCTION;
101 };
102 
103 #endif
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
void SetOperationToXor()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:60
Store vtkAlgorithm input/output information.
void SetOperationToAnd()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:58
void SetInputData(vtkDataObject *)
Assign a data object as input.
#define VTK_NOR
Definition: vtkImageLogic.h:36
Generic filter that has one input.
#define VTK_OR
Definition: vtkImageLogic.h:33
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
void SetOperationToNor()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:62
#define VTK_NAND
Definition: vtkImageLogic.h:35
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 SetOperationToOr()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:59
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOperationToNand()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:61
virtual void SetInput1Data(vtkDataObject *input)
Set the Input1 of this filter.
Definition: vtkImageLogic.h:77
#define VTK_XOR
Definition: vtkImageLogic.h:34
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
#define VTK_NOT
Definition: vtkImageLogic.h:37
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOperationToNot()
Set/Get the Operation to perform.
Definition: vtkImageLogic.h:63
general representation of visualization data
Definition: vtkDataObject.h:64
And, or, xor, nand, nor, not.
Definition: vtkImageLogic.h:45
#define VTK_AND
Definition: vtkImageLogic.h:32
double OutputTrueValue
Definition: vtkImageLogic.h:89
virtual void SetInput2Data(vtkDataObject *input)
Set the Input2 of this filter.
Definition: vtkImageLogic.h:82