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 =========================================================================*/
00029 #ifndef __vtkImageStencil_h
00030 #define __vtkImageStencil_h
00031 
00032 #include "vtkImageToImageFilter.h"
00033 
00034 class vtkImageStencilData;
00035 
00036 class VTK_IMAGING_EXPORT vtkImageStencil : public vtkImageToImageFilter
00037 {
00038 public:
00039   static vtkImageStencil *New();
00040   vtkTypeRevisionMacro(vtkImageStencil, vtkImageToImageFilter);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00046   virtual void SetStencil(vtkImageStencilData *stencil);
00047   vtkImageStencilData *GetStencil();
00049 
00051 
00052   vtkSetMacro(ReverseStencil, int);
00053   vtkBooleanMacro(ReverseStencil, int);
00054   vtkGetMacro(ReverseStencil, int);
00056 
00058 
00062   virtual void SetBackgroundInput(vtkImageData *input);
00063   vtkImageData *GetBackgroundInput();
00065 
00067 
00068   void SetBackgroundValue(float val) {
00069     this->SetBackgroundColor(val,val,val,val); };
00070   float GetBackgroundValue() {
00071     return this->BackgroundColor[0]; };
00073 
00075 
00077   vtkSetVector4Macro(BackgroundColor, float);
00078   vtkGetVector4Macro(BackgroundColor, float);
00080 
00081 protected:
00082   vtkImageStencil();
00083   ~vtkImageStencil();
00084 
00085   void ExecuteInformation() {
00086     this->vtkImageToImageFilter::ExecuteInformation(); };
00087   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00088 
00089   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00090                        int extent[6], int id);
00091   
00092   int ReverseStencil;
00093   float BackgroundColor[4];
00094 private:
00095   vtkImageStencil(const vtkImageStencil&);  // Not implemented.
00096   void operator=(const vtkImageStencil&);  // Not implemented.
00097 };
00098 
00099 #endif
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112