VTK
|
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 "vtkPointSetAlgorithm.h" 00029 00030 class VTK_GRAPHICS_EXPORT vtkWarpLens : public vtkPointSetAlgorithm 00031 { 00032 public: 00033 static vtkWarpLens *New(); 00034 vtkTypeMacro(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 int FillInputPortInformation(int port, vtkInformation *info); 00090 00091 protected: 00092 vtkWarpLens(); 00093 ~vtkWarpLens() {}; 00094 00095 int RequestDataObject(vtkInformation *request, 00096 vtkInformationVector **inputVector, 00097 vtkInformationVector *outputVector); 00098 int RequestData(vtkInformation *, 00099 vtkInformationVector **, 00100 vtkInformationVector *); 00101 00102 double PrincipalPoint[2]; // The calibrated principal point of camera/lens in mm 00103 double K1; // Symmetric radial distortion parameters 00104 double K2; 00105 double P1; // Decentering distortion parameters 00106 double P2; 00107 double FormatWidth; // imager format width in mm 00108 double FormatHeight; // imager format height in mm 00109 int ImageWidth; // image width in pixels 00110 int ImageHeight; // image height in pixels 00111 private: 00112 vtkWarpLens(const vtkWarpLens&); // Not implemented. 00113 void operator=(const vtkWarpLens&); // Not implemented. 00114 }; 00115 00116 #endif