00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00036
#ifndef __vtkImageMask_h
00037
#define __vtkImageMask_h
00038
00039
00040
#include "vtkImageTwoInputFilter.h"
00041
00042 class VTK_IMAGING_EXPORT vtkImageMask :
public vtkImageTwoInputFilter
00043 {
00044
public:
00045
static vtkImageMask *
New();
00046 vtkTypeRevisionMacro(vtkImageMask,
vtkImageTwoInputFilter);
00047
void PrintSelf(ostream& os,
vtkIndent indent);
00048
00050
00051
void SetMaskedOutputValue(
int num,
float *v);
00052 void SetMaskedOutputValue(
float v) {this->SetMaskedOutputValue(1, &v);}
00053 void SetMaskedOutputValue(
float v1,
float v2)
00054 {
float v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
00055 void SetMaskedOutputValue(
float v1,
float v2,
float v3)
00056 {
float v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
00057 float *GetMaskedOutputValue() {
return this->MaskedOutputValue;}
00058 int GetMaskedOutputValueLength() {
return this->MaskedOutputValueLength;}
00060
00062
00065 vtkSetClampMacro ( MaskAlpha,
float, 0.0, 1.0 );
00066 vtkGetMacro ( MaskAlpha,
float );
00068
00070 void SetImageInput(
vtkImageData *in) {this->
SetInput1(in);}
00071
00073 void SetMaskInput(
vtkImageData *in) {this->
SetInput2(in);}
00074
00076
00080 vtkSetMacro(NotMask,
int);
00081 vtkGetMacro(NotMask,
int);
00082 vtkBooleanMacro(NotMask,
int);
00084
00085
protected:
00086 vtkImageMask();
00087 ~vtkImageMask();
00088
00089 float *MaskedOutputValue;
00090 int MaskedOutputValueLength;
00091 int NotMask;
00092 float MaskAlpha;
00093
00094
void ExecuteInformation(
vtkImageData **inDatas,
vtkImageData *outData);
00095 void ExecuteInformation(){this->
vtkImageTwoInputFilter::ExecuteInformation();};
00096
00097
void ThreadedExecute(
vtkImageData **inDatas,
vtkImageData *outData,
00098
int extent[6],
int id);
00099
private:
00100 vtkImageMask(
const vtkImageMask&);
00101
void operator=(
const vtkImageMask&);
00102 };
00103
00104
#endif
00105
00106
00107