00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkImageMask_h
00033 #define __vtkImageMask_h
00034
00035
00036 #include "vtkThreadedImageAlgorithm.h"
00037
00038 class VTK_IMAGING_EXPORT vtkImageMask : public vtkThreadedImageAlgorithm
00039 {
00040 public:
00041 static vtkImageMask *New();
00042 vtkTypeRevisionMacro(vtkImageMask,vtkThreadedImageAlgorithm);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00046
00047 void SetMaskedOutputValue(int num, double *v);
00048 void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
00049 void SetMaskedOutputValue(double v1, double v2)
00050 {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
00051 void SetMaskedOutputValue(double v1, double v2, double v3)
00052 {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
00053 double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
00054 int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
00056
00058
00061 vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
00062 vtkGetMacro ( MaskAlpha, double );
00064
00066 void SetImageInput(vtkImageData *in);
00067
00069 void SetMaskInput(vtkImageData *in);
00070
00072
00076 vtkSetMacro(NotMask,int);
00077 vtkGetMacro(NotMask,int);
00078 vtkBooleanMacro(NotMask, int);
00080
00082
00083 virtual void SetInput1(vtkDataObject *in) { this->SetInput(0,in); }
00084 virtual void SetInput2(vtkDataObject *in) { this->SetInput(1,in); }
00086
00087 protected:
00088 vtkImageMask();
00089 ~vtkImageMask();
00090
00091 double *MaskedOutputValue;
00092 int MaskedOutputValueLength;
00093 int NotMask;
00094 double MaskAlpha;
00095
00096 virtual int RequestInformation (vtkInformation *,
00097 vtkInformationVector **,
00098 vtkInformationVector *);
00099
00100
00101 virtual void ThreadedRequestData(vtkInformation *request,
00102 vtkInformationVector **inputVector,
00103 vtkInformationVector *outputVector,
00104 vtkImageData ***inData,
00105 vtkImageData **outData,
00106 int extent[6], int threadId);
00107
00108 private:
00109 vtkImageMask(const vtkImageMask&);
00110 void operator=(const vtkImageMask&);
00111 };
00112
00113 #endif
00114
00115
00116