Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    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(float val) {
    00079     this->SetBackgroundColor(val,val,val,val); };
    00080   float GetBackgroundValue() {
    00081     return this->BackgroundColor[0]; };
    00083
    00085
    00087   vtkSetVector4Macro(BackgroundColor, float);
    00088   vtkGetVector4Macro(BackgroundColor, float);
    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   float BackgroundColor[4];
    00104 private:
    00105   vtkImageStencil(const vtkImageStencil&);  // Not implemented.
    00106   void operator=(const vtkImageStencil&);  // Not implemented.
    00107 };
    00108
    00109 #endif
    00110
    00111
    00112
    00113
    00114
    00115
    00116
    00117
    00118
    00119
    00120
    00121
    00122