VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkWarpLens.h,v $ 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 "vtkPointSetAlgorithm.h" 00029 00030 class VTK_GRAPHICS_EXPORT vtkWarpLens : public vtkPointSetAlgorithm 00031 { 00032 public: 00033 static vtkWarpLens *New(); 00034 vtkTypeRevisionMacro(vtkWarpLens,vtkPointSetAlgorithm); 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 00038 00040 void SetKappa(double kappa); 00041 double GetKappa(); 00043 00045 00047 void SetCenter(double centerX, double centerY); 00048 double *GetCenter(); 00050 00052 00053 vtkSetVector2Macro(PrincipalPoint,double); 00054 vtkGetVectorMacro(PrincipalPoint,double,2); 00056 00058 00059 vtkSetMacro(K1,double); 00060 vtkGetMacro(K1,double); 00061 vtkSetMacro(K2,double); 00062 vtkGetMacro(K2,double); 00064 00066 00067 vtkSetMacro(P1,double); 00068 vtkGetMacro(P1,double); 00069 vtkSetMacro(P2,double); 00070 vtkGetMacro(P2,double); 00072 00074 00075 vtkSetMacro(FormatWidth,double); 00076 vtkGetMacro(FormatWidth,double); 00077 vtkSetMacro(FormatHeight,double); 00078 vtkGetMacro(FormatHeight,double); 00080 00082 00083 vtkSetMacro(ImageWidth,int); 00084 vtkGetMacro(ImageWidth,int); 00085 vtkSetMacro(ImageHeight,int); 00086 vtkGetMacro(ImageHeight,int); 00088 00089 protected: 00090 vtkWarpLens(); 00091 ~vtkWarpLens() {}; 00092 00093 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00094 00095 double PrincipalPoint[2]; // The calibrated principal point of camera/lens in mm 00096 double K1; // Symmetric radial distortion parameters 00097 double K2; 00098 double P1; // Decentering distortion parameters 00099 double P2; 00100 double FormatWidth; // imager format width in mm 00101 double FormatHeight; // imager format height in mm 00102 int ImageWidth; // image width in pixels 00103 int ImageHeight; // image height in pixels 00104 private: 00105 vtkWarpLens(const vtkWarpLens&); // Not implemented. 00106 void operator=(const vtkWarpLens&); // Not implemented. 00107 }; 00108 00109 #endif