dox/Imaging/vtkImageMathematics.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00030 #ifndef __vtkImageMathematics_h
00031 #define __vtkImageMathematics_h
00032
00033
00034
00035 #define VTK_ADD 0
00036 #define VTK_SUBTRACT 1
00037 #define VTK_MULTIPLY 2
00038 #define VTK_DIVIDE 3
00039 #define VTK_INVERT 4
00040 #define VTK_SIN 5
00041 #define VTK_COS 6
00042 #define VTK_EXP 7
00043 #define VTK_LOG 8
00044 #define VTK_ABS 9
00045 #define VTK_SQR 10
00046 #define VTK_SQRT 11
00047 #define VTK_MIN 12
00048 #define VTK_MAX 13
00049 #define VTK_ATAN 14
00050 #define VTK_ATAN2 15
00051 #define VTK_MULTIPLYBYK 16
00052 #define VTK_ADDC 17
00053 #define VTK_CONJUGATE 18
00054 #define VTK_COMPLEX_MULTIPLY 19
00055 #define VTK_REPLACECBYK 20
00056
00057 #include "vtkImageTwoInputFilter.h"
00058
00059 class VTK_IMAGING_EXPORT vtkImageMathematics : public vtkImageTwoInputFilter
00060 {
00061 public:
00062 static vtkImageMathematics *New();
00063 vtkTypeRevisionMacro(vtkImageMathematics,vtkImageTwoInputFilter);
00064 void PrintSelf(ostream& os, vtkIndent indent);
00065
00067
00068 vtkSetMacro(Operation,int);
00069 vtkGetMacro(Operation,int);
00070 void SetOperationToAdd() {this->SetOperation(VTK_ADD);};
00071 void SetOperationToSubtract() {this->SetOperation(VTK_SUBTRACT);};
00072 void SetOperationToMultiply() {this->SetOperation(VTK_MULTIPLY);};
00073 void SetOperationToDivide() {this->SetOperation(VTK_DIVIDE);};
00074 void SetOperationToConjugate() {this->SetOperation(VTK_CONJUGATE);};
00075 void SetOperationToComplexMultiply()
00076 {this->SetOperation(VTK_COMPLEX_MULTIPLY);};
00078
00079 void SetOperationToInvert() {this->SetOperation(VTK_INVERT);};
00080 void SetOperationToSin() {this->SetOperation(VTK_SIN);};
00081 void SetOperationToCos() {this->SetOperation(VTK_COS);};
00082 void SetOperationToExp() {this->SetOperation(VTK_EXP);};
00083 void SetOperationToLog() {this->SetOperation(VTK_LOG);};
00084 void SetOperationToAbsoluteValue() {this->SetOperation(VTK_ABS);};
00085 void SetOperationToSquare() {this->SetOperation(VTK_SQR);};
00086 void SetOperationToSquareRoot() {this->SetOperation(VTK_SQRT);};
00087 void SetOperationToMin() {this->SetOperation(VTK_MIN);};
00088 void SetOperationToMax() {this->SetOperation(VTK_MAX);};
00089
00090 void SetOperationToATAN() {this->SetOperation(VTK_ATAN);};
00091 void SetOperationToATAN2() {this->SetOperation(VTK_ATAN2);};
00092 void SetOperationToMultiplyByK() {this->SetOperation(VTK_MULTIPLYBYK);};
00093 void SetOperationToAddConstant() {this->SetOperation(VTK_ADDC);};
00094 void SetOperationToReplaceCByK() {this->SetOperation(VTK_REPLACECBYK);};
00095 vtkSetMacro(ConstantK,double);
00096 vtkGetMacro(ConstantK,double);
00097 vtkSetMacro(ConstantC,double);
00098 vtkGetMacro(ConstantC,double);
00099
00100
00101 vtkSetMacro(DivideByZeroToC,int);
00102 vtkGetMacro(DivideByZeroToC,int);
00103 vtkBooleanMacro(DivideByZeroToC,int);
00104
00105 protected:
00106 vtkImageMathematics();
00107 ~vtkImageMathematics() {};
00108
00109 int Operation;
00110 double ConstantK;
00111 double ConstantC;
00112 int DivideByZeroToC;
00113
00114 void ExecuteInformation(vtkImageData **inDatas, vtkImageData *outData);
00115 void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00116 void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00117 int extent[6], int id);
00118 private:
00119 vtkImageMathematics(const vtkImageMathematics&);
00120 void operator=(const vtkImageMathematics&);
00121 };
00122
00123 #endif
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136