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