VTK
dox/Common/Transforms/vtkWarpTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWarpTransform.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00024 #ifndef __vtkWarpTransform_h
00025 #define __vtkWarpTransform_h
00026 
00027 #include "vtkCommonTransformsModule.h" // For export macro
00028 #include "vtkAbstractTransform.h"
00029 
00030 class VTKCOMMONTRANSFORMS_EXPORT vtkWarpTransform : public vtkAbstractTransform
00031 {
00032 public:
00033 
00034   vtkTypeMacro(vtkWarpTransform,vtkAbstractTransform);
00035   void PrintSelf(ostream& os, vtkIndent indent);
00036 
00041   void Inverse();
00042 
00044 
00047   vtkGetMacro(InverseFlag,int);
00049 
00051 
00052   vtkSetMacro(InverseTolerance,double);
00053   vtkGetMacro(InverseTolerance,double);
00055 
00057 
00061   vtkSetMacro(InverseIterations,int);
00062   vtkGetMacro(InverseIterations,int);
00064 
00066 
00068   void InternalTransformPoint(const float in[3], float out[3]);
00069   void InternalTransformPoint(const double in[3], double out[3]);
00071 
00073 
00075   void InternalTransformDerivative(const float in[3], float out[3],
00076                                    float derivative[3][3]);
00077   void InternalTransformDerivative(const double in[3], double out[3],
00078                                    double derivative[3][3]);
00080 
00082 
00086   void TemplateTransformPoint(const float in[3], float out[3]) {
00087     this->ForwardTransformPoint(in,out); };
00088   void TemplateTransformPoint(const double in[3], double out[3]) {
00089     this->ForwardTransformPoint(in,out); };
00090   void TemplateTransformPoint(const float in[3], float out[3],
00091                               float derivative[3][3]) {
00092     this->ForwardTransformDerivative(in,out,derivative); };
00093   void TemplateTransformPoint(const double in[3], double out[3],
00094                               double derivative[3][3]) {
00095     this->ForwardTransformDerivative(in,out,derivative); };
00096   void TemplateTransformInverse(const float in[3], float out[3]) {
00097     this->InverseTransformPoint(in,out); };
00098   void TemplateTransformInverse(const double in[3], double out[3]) {
00099     this->InverseTransformPoint(in,out); };
00100   void TemplateTransformInverse(const float in[3], float out[3],
00101                                 float derivative[3][3]) {
00102     this->InverseTransformDerivative(in,out,derivative); };
00103   void TemplateTransformInverse(const double in[3], double out[3],
00104                                 double derivative[3][3]) {
00105     this->InverseTransformDerivative(in,out,derivative); };
00107 
00108 protected:
00109   vtkWarpTransform();
00110   ~vtkWarpTransform();
00111 
00113 
00115   virtual void ForwardTransformPoint(const float in[3], float out[3]) = 0;
00116   virtual void ForwardTransformPoint(const double in[3], double out[3]) = 0;
00118 
00120 
00121   virtual void ForwardTransformDerivative(const float in[3], float out[3],
00122                                           float derivative[3][3]) = 0;
00123   virtual void ForwardTransformDerivative(const double in[3], double out[3],
00124                                           double derivative[3][3]) = 0;
00126 
00128 
00131   virtual void InverseTransformPoint(const float in[3], float out[3]);
00132   virtual void InverseTransformPoint(const double in[3], double out[3]);
00134 
00136 
00139   virtual void InverseTransformDerivative(const float in[3], float out[3],
00140                                           float derivative[3][3]);
00141   virtual void InverseTransformDerivative(const double in[3], double out[3],
00142                                           double derivative[3][3]);
00144 
00145   int InverseFlag;
00146   int InverseIterations;
00147   double InverseTolerance;
00148 private:
00149   vtkWarpTransform(const vtkWarpTransform&);  // Not implemented.
00150   void operator=(const vtkWarpTransform&);  // Not implemented.
00151 };
00152 
00153 #endif
00154 
00155 
00156 
00157 
00158