VTK
vtkImageMaskBits.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMaskBits.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 vtkImageMaskBits_h
27 #define vtkImageMaskBits_h
28 
29 #include "vtkImagingMathModule.h" // For export macro
30 #include "vtkImageLogic.h" //For VTK_AND, VTK_OR ...
32 
34 {
35 public:
36  static vtkImageMaskBits *New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
42  vtkSetVector4Macro(Masks, unsigned int);
43  void SetMask(unsigned int mask)
44  {this->SetMasks(mask, mask, mask, mask);}
45  void SetMasks(unsigned int mask1, unsigned int mask2)
46  {this->SetMasks(mask1, mask2, 0xffffffff, 0xffffffff);}
47  void SetMasks(unsigned int mask1, unsigned int mask2, unsigned int mask3)
48  {this->SetMasks(mask1, mask2, mask3, 0xffffffff);}
49  vtkGetVector4Macro(Masks, unsigned int);
51 
53 
54  vtkSetMacro(Operation,int);
55  vtkGetMacro(Operation,int);
56  void SetOperationToAnd() {this->SetOperation(VTK_AND);};
57  void SetOperationToOr() {this->SetOperation(VTK_OR);};
58  void SetOperationToXor() {this->SetOperation(VTK_XOR);};
59  void SetOperationToNand() {this->SetOperation(VTK_NAND);};
60  void SetOperationToNor() {this->SetOperation(VTK_NOR);};
62 
63 protected:
66 
67  void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
68  int ext[6], int id);
69 
70  unsigned int Masks[4];
71  int Operation;
72 private:
73  vtkImageMaskBits(const vtkImageMaskBits&); // Not implemented.
74  void operator=(const vtkImageMaskBits&); // Not implemented.
75 };
76 
77 #endif
void SetMasks(unsigned int mask1, unsigned int mask2)
applies a bit-mask pattern to each component.
virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int threadId)
void SetMask(unsigned int mask)
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_NOR
Definition: vtkImageLogic.h:35
Generic filter that has one input..
void SetMasks(unsigned int mask1, unsigned int mask2, unsigned int mask3)
#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
#define VTK_NAND
Definition: vtkImageLogic.h:34
#define VTK_XOR
Definition: vtkImageLogic.h:33
static vtkAlgorithm * New()
#define VTKIMAGINGMATH_EXPORT
#define VTK_AND
Definition: vtkImageLogic.h:31