00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkImageStencil_h
00029 #define __vtkImageStencil_h
00030
00031 #include "vtkThreadedImageAlgorithm.h"
00032
00033 class vtkImageStencilData;
00034
00035 class VTK_IMAGING_EXPORT vtkImageStencil : public vtkThreadedImageAlgorithm
00036 {
00037 public:
00038 static vtkImageStencil *New();
00039 vtkTypeRevisionMacro(vtkImageStencil, vtkThreadedImageAlgorithm);
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 virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00085
00086 void ThreadedRequestData(vtkInformation *request,
00087 vtkInformationVector **inputVector,
00088 vtkInformationVector *outputVector,
00089 vtkImageData ***inData, vtkImageData **outData,
00090 int extent[6], int id);
00091
00092 int ReverseStencil;
00093 double BackgroundColor[4];
00094
00095 virtual int FillInputPortInformation(int, vtkInformation*);
00096
00097 private:
00098 vtkImageStencil(const vtkImageStencil&);
00099 void operator=(const vtkImageStencil&);
00100 };
00101
00102 #endif