Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Imaging/vtkImageMaskBits.h

Go to the documentation of this file.

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