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 =========================================================================*/
26 #ifndef vtkImageLogic_h
27 #define vtkImageLogic_h
28 
29 
30 // Operation options.
31 #define VTK_AND 0
32 #define VTK_OR 1
33 #define VTK_XOR 2
34 #define VTK_NAND 3
35 #define VTK_NOR 4
36 #define VTK_NOT 5
37 #define VTK_NOP 6
38 
39 
40 
41 #include "vtkImagingMathModule.h" // For export macro
43 
45 {
46 public:
47  static vtkImageLogic *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  vtkSetMacro(Operation,int);
54  vtkGetMacro(Operation,int);
55  void SetOperationToAnd() {this->SetOperation(VTK_AND);};
56  void SetOperationToOr() {this->SetOperation(VTK_OR);};
57  void SetOperationToXor() {this->SetOperation(VTK_XOR);};
58  void SetOperationToNand() {this->SetOperation(VTK_NAND);};
59  void SetOperationToNor() {this->SetOperation(VTK_NOR);};
60  void SetOperationToNot() {this->SetOperation(VTK_NOT);};
62 
64 
65  vtkSetMacro(OutputTrueValue, double);
66  vtkGetMacro(OutputTrueValue, double);
68 
70  virtual void SetInput1Data(vtkDataObject *input) { this->SetInputData(0,input);};
71 
73  virtual void SetInput2Data(vtkDataObject *input) { this->SetInputData(1,input);};
74 
75 protected:
76  vtkImageLogic();
78 
79  int Operation;
81 
82  void ThreadedRequestData (vtkInformation* request,
83  vtkInformationVector** inputVector,
84  vtkInformationVector* outputVector,
85  vtkImageData ***inData, vtkImageData **outData,
86  int ext[6], int id);
88 
89 private:
90  vtkImageLogic(const vtkImageLogic&); // Not implemented.
91  void operator=(const vtkImageLogic&); // Not implemented.
92 };
93 
94 #endif
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
void SetOperationToXor()
Definition: vtkImageLogic.h:57
Store vtkAlgorithm input/output information.
void SetOperationToAnd()
Definition: vtkImageLogic.h:55
void SetInputData(vtkDataObject *)
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_NOR
Definition: vtkImageLogic.h:35
Generic filter that has one input..
#define VTK_OR
Definition: vtkImageLogic.h:32
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void SetOperationToNor()
Definition: vtkImageLogic.h:59
#define VTK_NAND
Definition: vtkImageLogic.h:34
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
void SetOperationToOr()
Definition: vtkImageLogic.h:56
void SetOperationToNand()
Definition: vtkImageLogic.h:58
virtual void SetInput1Data(vtkDataObject *input)
Definition: vtkImageLogic.h:70
#define VTK_XOR
Definition: vtkImageLogic.h:33
#define VTK_NOT
Definition: vtkImageLogic.h:36
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void SetOperationToNot()
Definition: vtkImageLogic.h:60
#define VTKIMAGINGMATH_EXPORT
general representation of visualization data
Definition: vtkDataObject.h:64
And, or, xor, nand, nor, not.
Definition: vtkImageLogic.h:44
#define VTK_AND
Definition: vtkImageLogic.h:31
double OutputTrueValue
Definition: vtkImageLogic.h:80
virtual void SetInput2Data(vtkDataObject *input)
Definition: vtkImageLogic.h:73