OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
ossim2dBilinearTransform allows one to specify a set of input points and output points and will fit a bilinear transform to those points. More...
#include <ossim2dBilinearTransform.h>
Public Member Functions | |
ossim2dBilinearTransform () | |
Initialize to the identity. More... | |
ossim2dBilinearTransform (const ossimDpt *input, const ossimDpt *output, ossim_uint32 arraySize) | |
Initialize the transform that best fits the input and output arrays. More... | |
ossim2dBilinearTransform (const ossimDpt &in1, const ossimDpt &in2, const ossimDpt &in3, const ossimDpt &in4, const ossimDpt &out1, const ossimDpt &out2, const ossimDpt &out3, const ossimDpt &out4) | |
Mapping 4 corners to an output 4 corners. More... | |
ossim2dBilinearTransform (const ossim2dBilinearTransform &src) | |
Copy constructor. More... | |
virtual ossimObject * | dup () const |
Duplication method that duplicates this object. More... | |
const ossim2dBilinearTransform & | operator= (const ossim2dBilinearTransform &src) |
Overloaded operator equal that allows for assignment. More... | |
void | setFromPoints (const ossimDpt &in1, const ossimDpt &in2, const ossimDpt &in3, const ossimDpt &in4, const ossimDpt &out1, const ossimDpt &out2, const ossimDpt &out3, const ossimDpt &out4) |
Mapping 4 corners to an output 4 corners. More... | |
void | setFromPoints (const ossimDpt *input, const ossimDpt *output, ossim_uint32 arraySize) |
Initialize the transform that best fits the input and output arrays. More... | |
virtual void | forward (const ossimDpt &input, ossimDpt &output) const |
forward transform will transform an input point to the output. More... | |
virtual void | forward (ossimDpt &modify_this) const |
forward transform will transform an input point to the output and modify the passed in point to the new value More... | |
virtual void | inverse (const ossimDpt &input, ossimDpt &output) const |
Inverts the point back to the original input value. More... | |
virtual void | inverse (ossimDpt &modify_this) const |
Inverts the point back to the original input value and modifies the passed in point to the new value. More... | |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
Saves the state of this object. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
loads the state of this object from a keywordlist. More... | |
virtual std::ostream & | print (std::ostream &out) const |
prints the contents of this object. More... | |
![]() | |
virtual const ossim2dTo2dTransform & | operator= (const ossim2dTo2dTransform &rhs) |
virtual ossimDpt | getOrigin () const |
void | setConvergenceThreshold (const double &new_threshold) |
void | setMaxIterations (int new_max_iters) |
void | setDxDy (const ossimDpt &dxdy) |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Protected Attributes | |
ossim_float64 | m_coefficientsXTerm [4] |
ossim_float64 | m_coefficientsYTerm [4] |
ossim_float64 | m_inverseCoefficientsXTerm [4] |
ossim_float64 | m_inverseCoefficientsYTerm [4] |
TYPE_DATA | |
![]() | |
double | theConvergenceThreshold |
int | theMaxIterations |
ossimDpt | theDxDy |
Additional Inherited Members | |
![]() | |
ossim2dTo2dTransform () | |
virtual | ~ossim2dTo2dTransform () |
![]() | |
virtual | ~ossimReferenced () |
ossim2dBilinearTransform allows one to specify a set of input points and output points and will fit a bilinear transform to those points.
Function of the form is solved for each
output dimension.
z(x,y) = a + b*x + c*y + d*x*y
We use the ossimLeastSquareBilin solver to solve for the coefficients.
Definition at line 15 of file ossim2dBilinearTransform.h.
ossim2dBilinearTransform::ossim2dBilinearTransform | ( | ) |
Initialize to the identity.
Definition at line 6 of file ossim2dBilinearTransform.cpp.
References m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, and m_inverseCoefficientsYTerm.
|
inline |
Initialize the transform that best fits the input and output arrays.
If the input and output are well dispersed and are 4 points it should fit exactly. Both arrays should be of equal number of points
input | the list of input points |
output | the list of output points to transform the input to |
arraySize | the number of points for the arrays. |
Definition at line 32 of file ossim2dBilinearTransform.h.
|
inline |
Mapping 4 corners to an output 4 corners.
Definition at line 43 of file ossim2dBilinearTransform.h.
ossim2dBilinearTransform::ossim2dBilinearTransform | ( | const ossim2dBilinearTransform & | src | ) |
Copy constructor.
Definition at line 21 of file ossim2dBilinearTransform.cpp.
References m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, and m_inverseCoefficientsYTerm.
|
inlinevirtual |
Duplication method that duplicates this object.
Reimplemented from ossimObject.
Definition at line 57 of file ossim2dBilinearTransform.h.
|
inlinevirtual |
forward transform will transform an input point to the output.
Implements ossim2dTo2dTransform.
Definition at line 101 of file ossim2dBilinearTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
inlinevirtual |
forward transform will transform an input point to the output and modify the passed in point to the new value
Reimplemented from ossim2dTo2dTransform.
Definition at line 118 of file ossim2dBilinearTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
inlinevirtual |
Inverts the point back to the original input value.
Reimplemented from ossim2dTo2dTransform.
Definition at line 134 of file ossim2dBilinearTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
inlinevirtual |
Inverts the point back to the original input value and modifies the passed in point to the new value.
Reimplemented from ossim2dTo2dTransform.
Definition at line 151 of file ossim2dBilinearTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
virtual |
loads the state of this object from a keywordlist.
Reimplemented from ossim2dTo2dTransform.
Definition at line 102 of file ossim2dBilinearTransform.cpp.
References ossimKeywordlist::find(), ossim2dTo2dTransform::loadState(), m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, and ossimString::split().
|
inline |
Overloaded operator equal that allows for assignment.
src | the src data to copy into this object. It will call the base classes equal operator. |
Definition at line 65 of file ossim2dBilinearTransform.h.
References m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, and ossim2dTo2dTransform::operator=().
|
inlinevirtual |
prints the contents of this object.
Will also cal the base classes print method.
Reimplemented from ossim2dTo2dTransform.
Definition at line 180 of file ossim2dBilinearTransform.h.
References ossim2dTo2dTransform::print().
|
virtual |
Saves the state of this object.
Reimplemented from ossim2dTo2dTransform.
Definition at line 75 of file ossim2dBilinearTransform.cpp.
References ossimKeywordlist::add(), m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, ossim2dTo2dTransform::saveState(), and ossimString::toString().
void ossim2dBilinearTransform::setFromPoints | ( | const ossimDpt & | in1, |
const ossimDpt & | in2, | ||
const ossimDpt & | in3, | ||
const ossimDpt & | in4, | ||
const ossimDpt & | out1, | ||
const ossimDpt & | out2, | ||
const ossimDpt & | out3, | ||
const ossimDpt & | out4 | ||
) |
Mapping 4 corners to an output 4 corners.
Will use the ossimLeastSquareBilin class to solve the bilinear coefficients that maps the given input points to the output points.
Definition at line 30 of file ossim2dBilinearTransform.cpp.
void ossim2dBilinearTransform::setFromPoints | ( | const ossimDpt * | input, |
const ossimDpt * | output, | ||
ossim_uint32 | arraySize | ||
) |
Initialize the transform that best fits the input and output arrays.
If the input and output are well dispersed and are 4 points it should fit exactly. Both arrays should be of equal number of points
input | the list of input points |
output | the list of output points to transform the input to |
arraySize | the number of points for the arrays. |
Definition at line 49 of file ossim2dBilinearTransform.cpp.
References ossimLeastSquaresBilin::addSample(), ossimLeastSquaresBilin::getLSParms(), m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, ossimLeastSquaresBilin::solveLS(), x, and y.
|
protected |
Definition at line 197 of file ossim2dBilinearTransform.h.
Referenced by loadState(), operator=(), ossim2dBilinearTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 198 of file ossim2dBilinearTransform.h.
Referenced by loadState(), operator=(), ossim2dBilinearTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 200 of file ossim2dBilinearTransform.h.
Referenced by loadState(), operator=(), ossim2dBilinearTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 201 of file ossim2dBilinearTransform.h.
Referenced by loadState(), operator=(), ossim2dBilinearTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 202 of file ossim2dBilinearTransform.h.