VTK
dox/Filters/General/vtkWarpLens.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWarpLens.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 =========================================================================*/
00025 #ifndef __vtkWarpLens_h
00026 #define __vtkWarpLens_h
00027 
00028 #include "vtkFiltersGeneralModule.h" // For export macro
00029 #include "vtkPointSetAlgorithm.h"
00030 
00031 class VTKFILTERSGENERAL_EXPORT vtkWarpLens : public vtkPointSetAlgorithm
00032 {
00033 public:
00034   static vtkWarpLens *New();
00035   vtkTypeMacro(vtkWarpLens,vtkPointSetAlgorithm);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00039 
00041   void SetKappa(double kappa);
00042   double GetKappa();
00044 
00046 
00048   void SetCenter(double centerX, double centerY);
00049   double *GetCenter();
00051 
00053 
00054   vtkSetVector2Macro(PrincipalPoint,double);
00055   vtkGetVectorMacro(PrincipalPoint,double,2);
00057 
00059 
00060   vtkSetMacro(K1,double);
00061   vtkGetMacro(K1,double);
00062   vtkSetMacro(K2,double);
00063   vtkGetMacro(K2,double);
00065 
00067 
00068   vtkSetMacro(P1,double);
00069   vtkGetMacro(P1,double);
00070   vtkSetMacro(P2,double);
00071   vtkGetMacro(P2,double);
00073 
00075 
00076   vtkSetMacro(FormatWidth,double);
00077   vtkGetMacro(FormatWidth,double);
00078   vtkSetMacro(FormatHeight,double);
00079   vtkGetMacro(FormatHeight,double);
00081 
00083 
00084   vtkSetMacro(ImageWidth,int);
00085   vtkGetMacro(ImageWidth,int);
00086   vtkSetMacro(ImageHeight,int);
00087   vtkGetMacro(ImageHeight,int);
00089 
00090   int FillInputPortInformation(int port, vtkInformation *info);
00091 
00092 protected:
00093   vtkWarpLens();
00094   ~vtkWarpLens() {};
00095 
00096   int RequestDataObject(vtkInformation *request,
00097                         vtkInformationVector **inputVector,
00098                         vtkInformationVector *outputVector);
00099   int RequestData(vtkInformation *,
00100                   vtkInformationVector **,
00101                   vtkInformationVector *);
00102 
00103   double PrincipalPoint[2];      // The calibrated principal point of camera/lens in mm
00104   double K1;                     // Symmetric radial distortion parameters
00105   double K2;
00106   double P1;                     // Decentering distortion parameters
00107   double P2;
00108   double FormatWidth;            // imager format width in mm
00109   double FormatHeight;           // imager format height in mm
00110   int ImageWidth;               // image width in pixels
00111   int ImageHeight;              // image height in pixels
00112 private:
00113   vtkWarpLens(const vtkWarpLens&);  // Not implemented.
00114   void operator=(const vtkWarpLens&);  // Not implemented.
00115 };
00116 
00117 #endif