3 #include <DDImage/Iop.h> 4 #include <DDImage/Box.h> 5 #include <DDImage/Filter.h> 6 #include <DDImage/Knobs.h> 7 #include <DDImage/Pixel.h> 8 #include <DDImage/Row.h> 9 #include <DDImage/Tile.h> 10 #include <DDImage/NukeWrapper.h> 11 #include <ldpk/ldpk_ldp_builtin.h> 32 {
return (_x != HUGE_VAL) && (_y != HUGE_VAL); }
40 DD::Image::Filter _filter;
46 int _knob_output_mode;
52 float _knob_bbox_margin[2];
54 double _xa_fov_unit,_ya_fov_unit;
55 double _xb_fov_unit,_yb_fov_unit;
56 double _xd_fov_unit,_yd_fov_unit;
57 double _inv_xd_fov_unit,_inv_yd_fov_unit;
59 int _num_par_adjustable_double;
68 double* _values_adjustable_double;
69 double* _values_double;
71 const char** _values_string;
72 const char** _values_file;
75 char** _defaults_string;
76 char** _defaults_file;
81 DD::Image::Hash _lut_hash;
87 DD::Image::Box _box_requested;
90 double map_in_fov_x(
double x_unit)
const 91 {
return (x_unit - _xa_fov_unit) * _inv_xd_fov_unit; }
93 double map_in_fov_y(
double y_unit)
const 94 {
return (y_unit - _ya_fov_unit) * _inv_yd_fov_unit; }
96 double map_out_fov_x(
double x_fov)
const 97 {
return x_fov * _xd_fov_unit + _xa_fov_unit; }
99 double map_out_fov_y(
double y_fov)
const 100 {
return y_fov * _yd_fov_unit + _ya_fov_unit; }
107 std::string nukify_name(
const std::string& name);
109 enum direction_enum { distort = 0,undistort = 1 };
110 DD::Image::Box bounds(direction_enum,
int x,
int y,
int r,
int t);
112 void set_default_values();
114 void check_indices(
int i_par_adjustable_double,
int i_par_double,
int i_par_int,
int i_par_string,
int i_par_file,
int i_par_toggle,
int i_debug)
const;
120 bool _verbose_request;
122 bool _verbose_validate;
124 bool _verbose_constructor;
126 bool _verbose_destructor;
133 void knobs(DD::Image::Knob_Callback f);
134 void _validate(
bool);
135 void _request(
int x,
int y,
int r,
int t,DD::Image::ChannelMask channels,
int count);
137 void engine(
int y,
int x,
int r,DD::Image::ChannelMask channels,DD::Image::Row& out);
139 static const DD::Image::Iop::Description description;
Definition: nuke_ld_3de4_base.h:16
Lens Distortion Plugin Base Class.
Definition: tde4_ld_plugin.h:29
The baseclass for Nuke plugins around LDPK-based lens distortion models. In order to implement a Nuke...
Definition: nuke_ld_3de4_base.h:37