Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageMaskBits.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageMaskBits.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00037 #ifndef __vtkImageMaskBits_h
00038 #define __vtkImageMaskBits_h
00039 
00040 #include "vtkImageLogic.h"  //For VTK_AND, VTK_OR ...
00041 #include "vtkThreadedImageAlgorithm.h"    
00042 
00043 class VTK_IMAGING_EXPORT vtkImageMaskBits : public vtkThreadedImageAlgorithm
00044 {
00045 public:
00046   static vtkImageMaskBits *New();
00047   vtkTypeRevisionMacro(vtkImageMaskBits,vtkThreadedImageAlgorithm);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049   
00051 
00052   vtkSetVector4Macro(Masks, unsigned int);
00053   void SetMask(unsigned int  mask)
00054     {this->SetMasks(mask, mask, mask, mask);}
00055   void SetMasks(unsigned int  mask1, unsigned int mask2)
00056     {this->SetMasks(mask1, mask2, 0xffffffff,  0xffffffff);}
00057   void SetMasks(unsigned int  mask1, unsigned int mask2, unsigned int mask3)
00058     {this->SetMasks(mask1, mask2, mask3,  0xffffffff);}
00059   vtkGetVector4Macro(Masks, unsigned int);
00061 
00063 
00064   vtkSetMacro(Operation,int);
00065   vtkGetMacro(Operation,int);
00066   void SetOperationToAnd() {this->SetOperation(VTK_AND);};
00067   void SetOperationToOr() {this->SetOperation(VTK_OR);};
00068   void SetOperationToXor() {this->SetOperation(VTK_XOR);};
00069   void SetOperationToNand() {this->SetOperation(VTK_NAND);};
00070   void SetOperationToNor() {this->SetOperation(VTK_NOR);};
00072   
00073 protected:
00074   vtkImageMaskBits();
00075   ~vtkImageMaskBits() {};
00076 
00077   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, 
00078                        int ext[6], int id);
00079 
00080   unsigned int Masks[4];
00081   int Operation;      
00082 private:
00083   vtkImageMaskBits(const vtkImageMaskBits&);  // Not implemented.
00084   void operator=(const vtkImageMaskBits&);  // Not implemented.
00085 };
00086 
00087 #endif
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097