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 
42 
44 {
45 public:
46  static vtkImageLogic *New();
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
52  vtkSetMacro(Operation,int);
53  vtkGetMacro(Operation,int);
54  void SetOperationToAnd() {this->SetOperation(VTK_AND);};
55  void SetOperationToOr() {this->SetOperation(VTK_OR);};
56  void SetOperationToXor() {this->SetOperation(VTK_XOR);};
57  void SetOperationToNand() {this->SetOperation(VTK_NAND);};
58  void SetOperationToNor() {this->SetOperation(VTK_NOR);};
59  void SetOperationToNot() {this->SetOperation(VTK_NOT);};
61 
63 
64  vtkSetMacro(OutputTrueValue, double);
65  vtkGetMacro(OutputTrueValue, double);
67 
69  virtual void SetInput1(vtkDataObject *input) { this->SetInput(0,input);};
70 
72  virtual void SetInput2(vtkDataObject *input) { this->SetInput(1,input);};
73 
74 protected:
75  vtkImageLogic();
77 
78  int Operation;
80 
81  void ThreadedRequestData (vtkInformation* request,
82  vtkInformationVector** inputVector,
83  vtkInformationVector* outputVector,
84  vtkImageData ***inData, vtkImageData **outData,
85  int ext[6], int id);
87 
88 private:
89  vtkImageLogic(const vtkImageLogic&); // Not implemented.
90  void operator=(const vtkImageLogic&); // Not implemented.
91 };
92 
93 #endif
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
void SetOperationToXor()
Definition: vtkImageLogic.h:56
virtual void SetInput1(vtkDataObject *input)
Definition: vtkImageLogic.h:69
Store vtkAlgorithm input/output information.
void SetOperationToAnd()
Definition: vtkImageLogic.h:54
virtual void SetInput2(vtkDataObject *input)
Definition: vtkImageLogic.h:72
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
void SetInput(vtkDataObject *)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
void SetOperationToNor()
Definition: vtkImageLogic.h:58
#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:55
void SetOperationToNand()
Definition: vtkImageLogic.h:57
#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:59
general representation of visualization data
Definition: vtkDataObject.h:70
And, or, xor, nand, nor, not.
Definition: vtkImageLogic.h:43
#define VTK_AND
Definition: vtkImageLogic.h:31
double OutputTrueValue
Definition: vtkImageLogic.h:79