00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkImageStencil_h
00026 #define __vtkImageStencil_h
00027
00028 #include "vtkThreadedImageAlgorithm.h"
00029
00030 class vtkImageStencilData;
00031
00032 class VTK_IMAGING_EXPORT vtkImageStencil : public vtkThreadedImageAlgorithm
00033 {
00034 public:
00035 static vtkImageStencil *New();
00036 vtkTypeRevisionMacro(vtkImageStencil, vtkThreadedImageAlgorithm);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00040
00042 virtual void SetStencil(vtkImageStencilData *stencil);
00043 vtkImageStencilData *GetStencil();
00045
00047
00048 vtkSetMacro(ReverseStencil, int);
00049 vtkBooleanMacro(ReverseStencil, int);
00050 vtkGetMacro(ReverseStencil, int);
00052
00054
00058 virtual void SetBackgroundInput(vtkImageData *input);
00059 vtkImageData *GetBackgroundInput();
00061
00063
00064 void SetBackgroundValue(double val) {
00065 this->SetBackgroundColor(val,val,val,val); };
00066 double GetBackgroundValue() {
00067 return this->BackgroundColor[0]; };
00069
00071
00073 vtkSetVector4Macro(BackgroundColor, double);
00074 vtkGetVector4Macro(BackgroundColor, double);
00076
00077 protected:
00078 vtkImageStencil();
00079 ~vtkImageStencil();
00080
00081 virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00082
00083 void ThreadedRequestData(vtkInformation *request,
00084 vtkInformationVector **inputVector,
00085 vtkInformationVector *outputVector,
00086 vtkImageData ***inData, vtkImageData **outData,
00087 int extent[6], int id);
00088
00089 int ReverseStencil;
00090 double BackgroundColor[4];
00091
00092 virtual int FillInputPortInformation(int, vtkInformation*);
00093
00094 private:
00095 vtkImageStencil(const vtkImageStencil&);
00096 void operator=(const vtkImageStencil&);
00097 };
00098
00099 #endif