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_IMAGING_EXPORT vtkImageMathematics : public vtkImageTwoInputFilter
00085 {
00086 public:
00087 static vtkImageMathematics *New();
00088 vtkTypeMacro(vtkImageMathematics,vtkImageTwoInputFilter);
00089 void PrintSelf(ostream& os, vtkIndent indent);
00090
00092
00093 vtkSetMacro(Operation,int);
00094 vtkGetMacro(Operation,int);
00095 void SetOperationToAdd() {this->SetOperation(VTK_ADD);};
00096 void SetOperationToSubtract() {this->SetOperation(VTK_SUBTRACT);};
00097 void SetOperationToMultiply() {this->SetOperation(VTK_MULTIPLY);};
00098 void SetOperationToDivide() {this->SetOperation(VTK_DIVIDE);};
00099 void SetOperationToConjugate() {this->SetOperation(VTK_CONJUGATE);};
00100 void SetOperationToComplexMultiply()
00101 {this->SetOperation(VTK_COMPLEX_MULTIPLY);};
00103
00104 void SetOperationToInvert() {this->SetOperation(VTK_INVERT);};
00105 void SetOperationToSin() {this->SetOperation(VTK_SIN);};
00106 void SetOperationToCos() {this->SetOperation(VTK_COS);};
00107 void SetOperationToExp() {this->SetOperation(VTK_EXP);};
00108 void SetOperationToLog() {this->SetOperation(VTK_LOG);};
00109 void SetOperationToAbsoluteValue() {this->SetOperation(VTK_ABS);};
00110 void SetOperationToSquare() {this->SetOperation(VTK_SQR);};
00111 void SetOperationToSquareRoot() {this->SetOperation(VTK_SQRT);};
00112 void SetOperationToMin() {this->SetOperation(VTK_MIN);};
00113 void SetOperationToMax() {this->SetOperation(VTK_MAX);};
00114
00115 void SetOperationToATAN() {this->SetOperation(VTK_ATAN);};
00116 void SetOperationToATAN2() {this->SetOperation(VTK_ATAN2);};
00117 void SetOperationToMultiplyByK() {this->SetOperation(VTK_MULTIPLYBYK);};
00118 void SetOperationToAddConstant() {this->SetOperation(VTK_ADDC);};
00119 void SetOperationToReplaceCByK() {this->SetOperation(VTK_REPLACECBYK);};
00120 vtkSetMacro(ConstantK,double);
00121 vtkGetMacro(ConstantK,double);
00122 vtkSetMacro(ConstantC,double);
00123 vtkGetMacro(ConstantC,double);
00124
00125 protected:
00126 vtkImageMathematics();
00127 ~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 private:
00138 vtkImageMathematics(const vtkImageMathematics&);
00139 void operator=(const vtkImageMathematics&);
00140 };
00141
00142 #endif
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155