Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

imaging/vtkImageMathematics.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageMathematics.h,v $
00005   Language:  C++
00006 
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012 
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015 
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019 
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023 
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 
00038 =========================================================================*/
00055 #ifndef __vtkImageMathematics_h
00056 #define __vtkImageMathematics_h
00057 
00058 
00059 // Operation options.
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 

Generated on Wed Nov 21 12:27:07 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001