OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
ossim2dTo2dMatrixTransform allows one to specify a set of input points and output points and will fit a bilinear transform to those points. More...
#include <ossim2dTo2dMatrixTransform.h>
Public Member Functions | |
ossim2dTo2dMatrixTransform () | |
Initialize to the identity. More... | |
ossim2dTo2dMatrixTransform (const ossimDpt *input, const ossimDpt *output, ossim_uint32 arraySize) | |
Initialize the transform that best fits the input and output arrays. More... | |
ossim2dTo2dMatrixTransform (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... | |
ossim2dTo2dMatrixTransform (const ossim2dTo2dMatrixTransform &src) | |
Copy constructor. More... | |
virtual ossimObject * | dup () const |
Duplication method that duplicates this object. More... | |
const ossim2dTo2dMatrixTransform & | operator= (const ossim2dTo2dMatrixTransform &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 () |
ossim2dTo2dMatrixTransform 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 29 of file ossim2dTo2dMatrixTransform.h.
ossim2dTo2dMatrixTransform::ossim2dTo2dMatrixTransform | ( | ) |
Initialize to the identity.
Definition at line 19 of file ossim2dTo2dMatrixTransform.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 47 of file ossim2dTo2dMatrixTransform.h.
|
inline |
Mapping 4 corners to an output 4 corners.
Definition at line 58 of file ossim2dTo2dMatrixTransform.h.
ossim2dTo2dMatrixTransform::ossim2dTo2dMatrixTransform | ( | const ossim2dTo2dMatrixTransform & | src | ) |
Copy constructor.
Definition at line 34 of file ossim2dTo2dMatrixTransform.cpp.
References m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, and m_inverseCoefficientsYTerm.
|
inlinevirtual |
Duplication method that duplicates this object.
Reimplemented from ossimObject.
Definition at line 72 of file ossim2dTo2dMatrixTransform.h.
|
inlinevirtual |
forward transform will transform an input point to the output.
Implements ossim2dTo2dTransform.
Definition at line 116 of file ossim2dTo2dMatrixTransform.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 133 of file ossim2dTo2dMatrixTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
inlinevirtual |
Inverts the point back to the original input value.
Reimplemented from ossim2dTo2dTransform.
Definition at line 149 of file ossim2dTo2dMatrixTransform.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 166 of file ossim2dTo2dMatrixTransform.h.
References ossimDpt::x, and ossimDpt::y.
|
virtual |
loads the state of this object from a keywordlist.
Reimplemented from ossim2dTo2dTransform.
Definition at line 115 of file ossim2dTo2dMatrixTransform.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 80 of file ossim2dTo2dMatrixTransform.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 195 of file ossim2dTo2dMatrixTransform.h.
References ossim2dTo2dTransform::print().
|
virtual |
Saves the state of this object.
Reimplemented from ossim2dTo2dTransform.
Definition at line 88 of file ossim2dTo2dMatrixTransform.cpp.
References ossimKeywordlist::add(), m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, ossim2dTo2dTransform::saveState(), and ossimString::toString().
void ossim2dTo2dMatrixTransform::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 43 of file ossim2dTo2dMatrixTransform.cpp.
void ossim2dTo2dMatrixTransform::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 62 of file ossim2dTo2dMatrixTransform.cpp.
References ossimLeastSquaresBilin::addSample(), ossimLeastSquaresBilin::getLSParms(), m_coefficientsXTerm, m_coefficientsYTerm, m_inverseCoefficientsXTerm, m_inverseCoefficientsYTerm, ossimLeastSquaresBilin::solveLS(), x, and y.
|
protected |
Definition at line 212 of file ossim2dTo2dMatrixTransform.h.
Referenced by loadState(), operator=(), ossim2dTo2dMatrixTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 213 of file ossim2dTo2dMatrixTransform.h.
Referenced by loadState(), operator=(), ossim2dTo2dMatrixTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 215 of file ossim2dTo2dMatrixTransform.h.
Referenced by loadState(), operator=(), ossim2dTo2dMatrixTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 216 of file ossim2dTo2dMatrixTransform.h.
Referenced by loadState(), operator=(), ossim2dTo2dMatrixTransform(), saveState(), and setFromPoints().
|
protected |
Definition at line 217 of file ossim2dTo2dMatrixTransform.h.