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 "vtkImageLogic.h" //For VTK_AND, VTK_OR ...
31 
33 {
34 public:
35  static vtkImageMaskBits *New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40 
41  vtkSetVector4Macro(Masks, unsigned int);
42  void SetMask(unsigned int mask)
43  {this->SetMasks(mask, mask, mask, mask);}
44  void SetMasks(unsigned int mask1, unsigned int mask2)
45  {this->SetMasks(mask1, mask2, 0xffffffff, 0xffffffff);}
46  void SetMasks(unsigned int mask1, unsigned int mask2, unsigned int mask3)
47  {this->SetMasks(mask1, mask2, mask3, 0xffffffff);}
48  vtkGetVector4Macro(Masks, unsigned int);
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);};
61 
62 protected:
65 
66  void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
67  int ext[6], int id);
68 
69  unsigned int Masks[4];
70  int Operation;
71 private:
72  vtkImageMaskBits(const vtkImageMaskBits&); // Not implemented.
73  void operator=(const vtkImageMaskBits&); // Not implemented.
74 };
75 
76 #endif
77 
78 
79 
80 
81 
82 
83 
84 
85 
86