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

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 =========================================================================*/
00039 #ifndef __vtkImageStencil_h
00040 #define __vtkImageStencil_h
00041 
00042 #include "vtkImageToImageFilter.h"
00043 
00044 class vtkImageStencilData;
00045 
00046 class VTK_IMAGING_EXPORT vtkImageStencil : public vtkImageToImageFilter
00047 {
00048 public:
00049   static vtkImageStencil *New();
00050   vtkTypeRevisionMacro(vtkImageStencil, vtkImageToImageFilter);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   virtual void SetStencil(vtkImageStencilData *stencil);
00057   vtkImageStencilData *GetStencil();
00059 
00061 
00062   vtkSetMacro(ReverseStencil, int);
00063   vtkBooleanMacro(ReverseStencil, int);
00064   vtkGetMacro(ReverseStencil, int);
00066 
00068 
00072   virtual void SetBackgroundInput(vtkImageData *input);
00073   vtkImageData *GetBackgroundInput();
00075 
00077 
00078   void SetBackgroundValue(double val) {
00079     this->SetBackgroundColor(val,val,val,val); };
00080   double GetBackgroundValue() {
00081     return this->BackgroundColor[0]; };
00083 
00085 
00087   vtkSetVector4Macro(BackgroundColor, double);
00088   vtkGetVector4Macro(BackgroundColor, double);
00090 
00091 protected:
00092   vtkImageStencil();
00093   ~vtkImageStencil();
00094 
00095   void ExecuteInformation() {
00096     this->vtkImageToImageFilter::ExecuteInformation(); };
00097   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00098 
00099   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00100                        int extent[6], int id);
00101   
00102   int ReverseStencil;
00103   double BackgroundColor[4];
00104 
00105   virtual int FillInputPortInformation(int, vtkInformation*);
00106 private:
00107   vtkImageStencil(const vtkImageStencil&);  // Not implemented.
00108   void operator=(const vtkImageStencil&);  // Not implemented.
00109 };
00110 
00111 #endif
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124