VTK  9.5.20251120
vtkWarpLens.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
13
14#ifndef vtkWarpLens_h
15#define vtkWarpLens_h
16
17#include "vtkFiltersGeneralModule.h" // For export macro
19
20VTK_ABI_NAMESPACE_BEGIN
21class VTKFILTERSGENERAL_EXPORT vtkWarpLens : public vtkPointSetAlgorithm
22{
23public:
24 static vtkWarpLens* New();
26 void PrintSelf(ostream& os, vtkIndent indent) override;
27
29
33 void SetKappa(double kappa);
34 double GetKappa();
36
38
42 void SetCenter(double centerX, double centerY);
43 double* GetCenter() VTK_SIZEHINT(2);
45
47
50 vtkSetVector2Macro(PrincipalPoint, double);
51 vtkGetVectorMacro(PrincipalPoint, double, 2);
53
55
58 vtkSetMacro(K1, double);
59 vtkGetMacro(K1, double);
60 vtkSetMacro(K2, double);
61 vtkGetMacro(K2, double);
63
65
68 vtkSetMacro(P1, double);
69 vtkGetMacro(P1, double);
70 vtkSetMacro(P2, double);
71 vtkGetMacro(P2, double);
73
75
78 vtkSetMacro(FormatWidth, double);
79 vtkGetMacro(FormatWidth, double);
80 vtkSetMacro(FormatHeight, double);
81 vtkGetMacro(FormatHeight, double);
83
85
88 vtkSetMacro(ImageWidth, int);
89 vtkGetMacro(ImageWidth, int);
90 vtkSetMacro(ImageHeight, int);
91 vtkGetMacro(ImageHeight, int);
93
94 int FillInputPortInformation(int port, vtkInformation* info) override;
95
96protected:
98 ~vtkWarpLens() override = default;
99
101 vtkInformationVector* outputVector) override;
103
104 double PrincipalPoint[2]; // The calibrated principal point of camera/lens in mm
105 double K1; // Symmetric radial distortion parameters
106 double K2;
107 double P1; // Decentering distortion parameters
108 double P2;
109 double FormatWidth; // imager format width in mm
110 double FormatHeight; // imager format height in mm
111 int ImageWidth; // image width in pixels
112 int ImageHeight; // image height in pixels
113private:
114 vtkWarpLens(const vtkWarpLens&) = delete;
115 void operator=(const vtkWarpLens&) = delete;
116};
117
118VTK_ABI_NAMESPACE_END
119#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCenter(double centerX, double centerY)
Specify the center of radial distortion in pixels.
double PrincipalPoint[2]
double FormatWidth
double GetKappa()
Specify second order symmetric radial lens distortion parameter.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void SetKappa(double kappa)
Specify second order symmetric radial lens distortion parameter.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
double FormatHeight
double * GetCenter()
Specify the center of radial distortion in pixels.
static vtkWarpLens * New()
#define VTK_SIZEHINT(...)