VTK  9.2.6
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
27#ifndef vtkImageMaskBits_h
28#define vtkImageMaskBits_h
29
30#include "vtkImageLogic.h" //For VTK_AND, VTK_OR ...
31#include "vtkImagingMathModule.h" // For export macro
33
34class VTKIMAGINGMATH_EXPORT vtkImageMaskBits : public vtkThreadedImageAlgorithm
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
45 vtkSetVector4Macro(Masks, unsigned int);
46 void SetMask(unsigned int mask) { this->SetMasks(mask, mask, mask, mask); }
47 void SetMasks(unsigned int mask1, unsigned int mask2)
48 {
49 this->SetMasks(mask1, mask2, 0xffffffff, 0xffffffff);
50 }
51 void SetMasks(unsigned int mask1, unsigned int mask2, unsigned int mask3)
52 {
53 this->SetMasks(mask1, mask2, mask3, 0xffffffff);
54 }
55 vtkGetVector4Macro(Masks, unsigned int);
57
59
62 vtkSetMacro(Operation, int);
63 vtkGetMacro(Operation, int);
70
71protected:
73 ~vtkImageMaskBits() override = default;
74
75 void ThreadedExecute(vtkImageData* inData, vtkImageData* outData, int ext[6], int id) override;
76
77 unsigned int Masks[4];
79
80private:
81 vtkImageMaskBits(const vtkImageMaskBits&) = delete;
82 void operator=(const vtkImageMaskBits&) = delete;
83};
84
85#endif
topologically and geometrically regular array of data
void SetOperationToAnd()
Set/Get the boolean operator.
unsigned int Masks[4]
static vtkImageMaskBits * New()
void SetMasks(unsigned int mask1, unsigned int mask2)
Set/Get the bit-masks.
~vtkImageMaskBits() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetMask(unsigned int mask)
Set/Get the bit-masks.
void SetMasks(unsigned int mask1, unsigned int mask2, unsigned int mask3)
Set/Get the bit-masks.
virtual void SetOperation(int)
Set/Get the boolean operator.
void SetOperationToNand()
Set/Get the boolean operator.
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int ext[6], int id) override
void SetOperationToOr()
Set/Get the boolean operator.
virtual void SetMasks(unsigned int, unsigned int, unsigned int, unsigned int)
Set/Get the bit-masks.
void SetOperationToNor()
Set/Get the boolean operator.
void SetOperationToXor()
Set/Get the boolean operator.
a simple class to control print indentation
Definition vtkIndent.h:40
#define VTK_NAND
#define VTK_AND
#define VTK_XOR
#define VTK_NOR
#define VTK_OR