00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00055 #ifndef __vtkImageMathematics_h
00056 #define __vtkImageMathematics_h
00057
00058
00059
00060 #define VTK_ADD 0
00061 #define VTK_SUBTRACT 1
00062 #define VTK_MULTIPLY 2
00063 #define VTK_DIVIDE 3
00064 #define VTK_INVERT 4
00065 #define VTK_SIN 5
00066 #define VTK_COS 6
00067 #define VTK_EXP 7
00068 #define VTK_LOG 8
00069 #define VTK_ABS 9
00070 #define VTK_SQR 10
00071 #define VTK_SQRT 11
00072 #define VTK_MIN 12
00073 #define VTK_MAX 13
00074 #define VTK_ATAN 14
00075 #define VTK_ATAN2 15
00076 #define VTK_MULTIPLYBYK 16
00077 #define VTK_ADDC 17
00078 #define VTK_CONJUGATE 18
00079 #define VTK_COMPLEX_MULTIPLY 19
00080 #define VTK_REPLACECBYK 20
00081
00082 #include "vtkImageTwoInputFilter.h"
00083
00084 class VTK_EXPORT vtkImageMathematics : public vtkImageTwoInputFilter
00085 {
00086 public:
00087 static vtkImageMathematics *New();
00088 vtkTypeMacro(vtkImageMathematics,vtkImageTwoInputFilter);
00089 void PrintSelf(ostream& os, vtkIndent indent);
00090
00092 vtkSetMacro(Operation,int);
00093 vtkGetMacro(Operation,int);
00094 void SetOperationToAdd() {this->SetOperation(VTK_ADD);};
00095 void SetOperationToSubtract() {this->SetOperation(VTK_SUBTRACT);};
00096 void SetOperationToMultiply() {this->SetOperation(VTK_MULTIPLY);};
00097 void SetOperationToDivide() {this->SetOperation(VTK_DIVIDE);};
00098 void SetOperationToConjugate() {this->SetOperation(VTK_CONJUGATE);};
00099 void SetOperationToComplexMultiply()
00100 {this->SetOperation(VTK_COMPLEX_MULTIPLY);};
00101
00102 void SetOperationToInvert() {this->SetOperation(VTK_INVERT);};
00103 void SetOperationToSin() {this->SetOperation(VTK_SIN);};
00104 void SetOperationToCos() {this->SetOperation(VTK_COS);};
00105 void SetOperationToExp() {this->SetOperation(VTK_EXP);};
00106 void SetOperationToLog() {this->SetOperation(VTK_LOG);};
00107 void SetOperationToAbsoluteValue() {this->SetOperation(VTK_ABS);};
00108 void SetOperationToSquare() {this->SetOperation(VTK_SQR);};
00109 void SetOperationToSquareRoot() {this->SetOperation(VTK_SQRT);};
00110 void SetOperationToMin() {this->SetOperation(VTK_MIN);};
00111 void SetOperationToMax() {this->SetOperation(VTK_MAX);};
00112
00113 void SetOperationToATAN() {this->SetOperation(VTK_ATAN);};
00114 void SetOperationToATAN2() {this->SetOperation(VTK_ATAN2);};
00115 void SetOperationToMultiplyByK() {this->SetOperation(VTK_MULTIPLYBYK);};
00116 void SetOperationToAddConstant() {this->SetOperation(VTK_ADDC);};
00117 void SetOperationToReplaceCByK() {this->SetOperation(VTK_REPLACECBYK);};
00118 vtkSetMacro(ConstantK,double);
00119 vtkGetMacro(ConstantK,double);
00120 vtkSetMacro(ConstantC,double);
00121 vtkGetMacro(ConstantC,double);
00122
00123 protected:
00124 vtkImageMathematics();
00125 ~vtkImageMathematics() {};
00126 vtkImageMathematics(const vtkImageMathematics&) {};
00127 void operator=(const vtkImageMathematics&) {};
00128
00129 int Operation;
00130 double ConstantK;
00131 double ConstantC;
00132
00133 void ExecuteInformation(vtkImageData **inDatas, vtkImageData *outData);
00134 void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00135 void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00136 int extent[6], int id);
00137 };
00138
00139 #endif
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152