Class handling 2D transforms, mainly intended for image channels. This covers a simple but pretty important problem :
More...
|
ChannelTransform & | init_none () |
| Initialize a NONE transform.
|
ChannelTransform & | init_affine (double a_x, double a_y, double b_x, double b_y) |
| Initialize an AFFINE transform.
|
ChannelTransform & | init_affine_slantx (double a_x, double a_y, double b_x, double b_y, double slantx_center, double slantx_ampli) |
| Initialize an AFFINE_SLANTX transform.
|
ChannelTransform & | init_affine_interpx (double a_x, double a_y, double b_x, double b_y, std::vector< std::pair< double, double > > interpx_points) |
| Initialize an AFFINE_INTERPX transform.
|
ChannelTransform & | init_interp_xy (std::vector< std::pair< std::pair< double, double >, std::pair< double, double > > > interp_xy_points) |
transform_type_t | getType () |
| Get type of this transform.
|
void | render () |
| Render ImGui UI to edit the transform.
|
void | forward (double *x, double *y) const |
| Convert channel coordinates to reference coordinates.
|
void | reverse (double *x, double *y) const |
| Convert reference coordinates to channel coordinates.
|
Class handling 2D transforms, mainly intended for image channels. This covers a simple but pretty important problem :
Quite often, instrument channels are NOT perfectly aligned... Or the same resolution. This therefore requires the ability to shift them around and re-scale them. However, it often gets more complicated than that. For example, MWS (on AWS) or KMSS are made out of several detectors that are not scanning on the same axis, therefore they also need to be rotated around to align channels.
Instead of pre-aligning them and discarding data, or handling those cases specifically, this class defines several common or arbitrary transforms to convert each channel to a "reference" field. Therefore, by taking a channel's 2D X/Y coordinates, running it through its own reference's forward and then the target channel's reverse will give the equivalent coordinates on the other channel.
Available transforms are :
- 0, Invalid : Default, throws an exception
- 1, None : Does nothing, use if no transform is required between channels
- 2, Affine : ax + b form applied on both axis, meant for simple translations and resolution changes
- 3, Affine Slant X : Combines the affine transform and a shift in y identical at any point in x
- 4, Affine + Arbtitrary interpolation on the X axis (eg, for VIIRS with discountinuties between channels)
- 5, TODOREWORK