VTK
vtkWarpLens.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWarpLens.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkWarpLens_h
24 #define vtkWarpLens_h
25 
26 #include "vtkFiltersGeneralModule.h" // For export macro
27 #include "vtkPointSetAlgorithm.h"
28 
29 class VTKFILTERSGENERAL_EXPORT vtkWarpLens : public vtkPointSetAlgorithm
30 {
31 public:
32  static vtkWarpLens *New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
41  void SetKappa(double kappa);
42  double GetKappa();
44 
46 
50  void SetCenter(double centerX, double centerY);
51  double *GetCenter() VTK_SIZEHINT(2);
53 
55 
58  vtkSetVector2Macro(PrincipalPoint,double);
59  vtkGetVectorMacro(PrincipalPoint,double,2);
61 
63 
66  vtkSetMacro(K1,double);
67  vtkGetMacro(K1,double);
68  vtkSetMacro(K2,double);
69  vtkGetMacro(K2,double);
71 
73 
76  vtkSetMacro(P1,double);
77  vtkGetMacro(P1,double);
78  vtkSetMacro(P2,double);
79  vtkGetMacro(P2,double);
81 
83 
86  vtkSetMacro(FormatWidth,double);
87  vtkGetMacro(FormatWidth,double);
88  vtkSetMacro(FormatHeight,double);
89  vtkGetMacro(FormatHeight,double);
91 
93 
96  vtkSetMacro(ImageWidth,int);
97  vtkGetMacro(ImageWidth,int);
98  vtkSetMacro(ImageHeight,int);
99  vtkGetMacro(ImageHeight,int);
101 
102  int FillInputPortInformation(int port, vtkInformation *info) override;
103 
104 protected:
105  vtkWarpLens();
106  ~vtkWarpLens() override {}
107 
108  int RequestDataObject(vtkInformation *request,
109  vtkInformationVector **inputVector,
110  vtkInformationVector *outputVector) override;
113  vtkInformationVector *) override;
114 
115  double PrincipalPoint[2]; // The calibrated principal point of camera/lens in mm
116  double K1; // Symmetric radial distortion parameters
117  double K2;
118  double P1; // Decentering distortion parameters
119  double P2;
120  double FormatWidth; // imager format width in mm
121  double FormatHeight; // imager format height in mm
122  int ImageWidth; // image width in pixels
123  int ImageHeight; // image height in pixels
124 private:
125  vtkWarpLens(const vtkWarpLens&) = delete;
126  void operator=(const vtkWarpLens&) = delete;
127 };
128 
129 #endif
vtkWarpLens::P1
double P1
Definition: vtkWarpLens.h:118
vtkPointSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPointSetAlgorithm.h:43
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkWarpLens::P2
double P2
Definition: vtkWarpLens.h:119
vtkPointSetAlgorithm.h
vtkWarpLens::FormatWidth
double FormatWidth
Definition: vtkWarpLens.h:120
vtkX3D::port
Definition: vtkX3D.h:447
vtkPointSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkPointSetAlgorithm.h:132
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkPointSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkWarpLens::K1
double K1
Definition: vtkWarpLens.h:116
vtkWarpLens::ImageHeight
int ImageHeight
Definition: vtkWarpLens.h:123
P1
#define P1
Definition: vtkTableBasedClipCases.h:851
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkWarpLens::K2
double K2
Definition: vtkWarpLens.h:117
P2
#define P2
Definition: vtkTableBasedClipCases.h:852
vtkWarpLens
deform geometry by applying lens distortion
Definition: vtkWarpLens.h:29
vtkWarpLens::FormatHeight
double FormatHeight
Definition: vtkWarpLens.h:121
vtkPointSetAlgorithm::New
static vtkPointSetAlgorithm * New()
vtkWarpLens::ImageWidth
int ImageWidth
Definition: vtkWarpLens.h:122
vtkPointSetAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.