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

Common/vtkWarpTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWarpTransform.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 =========================================================================*/
00053 #ifndef __vtkWarpTransform_h
00054 #define __vtkWarpTransform_h
00055 
00056 #include "vtkAbstractTransform.h"
00057 
00058 class VTK_COMMON_EXPORT vtkWarpTransform : public vtkAbstractTransform
00059 {
00060 public:
00061 
00062   vtkTypeMacro(vtkWarpTransform,vtkAbstractTransform);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00069   void Inverse();
00070 
00072 
00075   vtkGetMacro(InverseFlag,int);
00077 
00079 
00080   vtkSetMacro(InverseTolerance,double);
00081   vtkGetMacro(InverseTolerance,double);
00083 
00085 
00089   vtkSetMacro(InverseIterations,int);
00090   vtkGetMacro(InverseIterations,int);
00092 
00094 
00096   void InternalTransformPoint(const float in[3], float out[3]);
00097   void InternalTransformPoint(const double in[3], double out[3]);
00099 
00101 
00103   void InternalTransformDerivative(const float in[3], float out[3],
00104                                    float derivative[3][3]);
00105   void InternalTransformDerivative(const double in[3], double out[3],
00106                                    double derivative[3][3]);
00108 
00110 
00114   void TemplateTransformPoint(const float in[3], float out[3]) {
00115     this->ForwardTransformPoint(in,out); }; 
00116   void TemplateTransformPoint(const double in[3], double out[3]) {
00117     this->ForwardTransformPoint(in,out); }; 
00118   void TemplateTransformPoint(const float in[3], float out[3],
00119                               float derivative[3][3]) {
00120     this->ForwardTransformDerivative(in,out,derivative); }; 
00121   void TemplateTransformPoint(const double in[3], double out[3],
00122                               double derivative[3][3]) {
00123     this->ForwardTransformDerivative(in,out,derivative); }; 
00124   void TemplateTransformInverse(const float in[3], float out[3]) {
00125     this->InverseTransformPoint(in,out); }; 
00126   void TemplateTransformInverse(const double in[3], double out[3]) {
00127     this->InverseTransformPoint(in,out); }; 
00128   void TemplateTransformInverse(const float in[3], float out[3],
00129                                 float derivative[3][3]) {
00130     this->InverseTransformDerivative(in,out,derivative); }; 
00131   void TemplateTransformInverse(const double in[3], double out[3],
00132                                 double derivative[3][3]) {
00133     this->InverseTransformDerivative(in,out,derivative); }; 
00135 
00136 protected:
00137   vtkWarpTransform();
00138   ~vtkWarpTransform();
00139 
00141 
00143   virtual void ForwardTransformPoint(const float in[3], float out[3]) = 0;
00144   virtual void ForwardTransformPoint(const double in[3], double out[3]) = 0;
00146 
00148 
00149   virtual void ForwardTransformDerivative(const float in[3], float out[3],
00150                                           float derivative[3][3]) = 0;
00151   virtual void ForwardTransformDerivative(const double in[3], double out[3],
00152                                           double derivative[3][3]) = 0;
00154 
00156 
00159   virtual void InverseTransformPoint(const float in[3], float out[3]);
00160   virtual void InverseTransformPoint(const double in[3], double out[3]);
00162 
00164 
00167   virtual void InverseTransformDerivative(const float in[3], float out[3],
00168                                           float derivative[3][3]);
00169   virtual void InverseTransformDerivative(const double in[3], double out[3],
00170                                           double derivative[3][3]);
00172 
00173   int InverseFlag;
00174   int InverseIterations;
00175   double InverseTolerance;
00176 private:
00177   vtkWarpTransform(const vtkWarpTransform&);  // Not implemented.
00178   void operator=(const vtkWarpTransform&);  // Not implemented.
00179 };
00180 
00181 #endif
00182 
00183 
00184 
00185 
00186 

Generated on Thu Mar 28 14:19:18 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001