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

Imaging/vtkImageStencil.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageStencil.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 =========================================================================*/
00040 #ifndef __vtkImageStencil_h
00041 #define __vtkImageStencil_h
00042 
00043 #include "vtkImageToImageFilter.h"
00044 
00045 class vtkImageStencilData;
00046 
00047 class VTK_IMAGING_EXPORT vtkImageStencil : public vtkImageToImageFilter
00048 {
00049 public:
00050   static vtkImageStencil *New();
00051   vtkTypeRevisionMacro(vtkImageStencil, vtkImageToImageFilter);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00057   virtual void SetStencil(vtkImageStencilData *stencil);
00058   vtkImageStencilData *GetStencil();
00060 
00062 
00063   vtkSetMacro(ReverseStencil, int);
00064   vtkBooleanMacro(ReverseStencil, int);
00065   vtkGetMacro(ReverseStencil, int);
00067 
00069 
00073   virtual void SetBackgroundInput(vtkImageData *input);
00074   vtkImageData *GetBackgroundInput();
00076 
00078 
00079   void SetBackgroundValue(float val) {
00080     this->SetBackgroundColor(val,val,val,val); };
00081   float GetBackgroundValue() {
00082     return this->BackgroundColor[0]; };
00084 
00086 
00088   vtkSetVector4Macro(BackgroundColor, float);
00089   vtkGetVector4Macro(BackgroundColor, float);
00091 
00092 protected:
00093   vtkImageStencil();
00094   ~vtkImageStencil();
00095 
00096   void ExecuteInformation() {
00097     this->vtkImageToImageFilter::ExecuteInformation(); };
00098   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00099 
00100   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00101                        int extent[6], int id);
00102   
00103   int ReverseStencil;
00104   float BackgroundColor[4];
00105 private:
00106   vtkImageStencil(const vtkImageStencil&);  // Not implemented.
00107   void operator=(const vtkImageStencil&);  // Not implemented.
00108 };
00109 
00110 #endif
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123