OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
InternalZGY::ImplicitLinearTransform2d Class Reference

#include <iltf2d.h>

Classes

struct  TiePoint
 

Public Types

typedef double value_type
 
typedef ImplicitLinearTransform2d this_type
 

Public Member Functions

 ImplicitLinearTransform2d ()
 
 ImplicitLinearTransform2d (const TiePoint &pt0, const TiePoint &pt1, const TiePoint &pt2)
 
bool operator== (const this_type &other) const
 
bool operator!= (const this_type &other) const
 
bool Compare (const this_type &other, const value_type &errtol=0) const
 
this_typePush (const this_type &other)
 
this_typeTranslate (value_type t0, value_type t1)
 
this_typeRotate (value_type r)
 
this_typeScale (value_type s0, value_type s1)
 
void Apply (value_type *b, const value_type *a) const
 
void operator() (value_type *b, const value_type *a) const
 

Static Public Member Functions

static TiePoint makeTiePoint ()
 
static TiePoint makeTiePoint (value_type a0, value_type a1, value_type b0, value_type b1)
 
static this_type Identity ()
 

Detailed Description

This class represents a linear transform T: R^2 -> R^2 from 2-dimensional Euclidean space A to 2-dimensional Euclidean space B, defined implicitly by three given tie points.

Member Typedef Documentation

◆ this_type

Type of values processed by this class.

Constructor & Destructor Documentation

◆ ImplicitLinearTransform2d() [1/2]

InternalZGY::ImplicitLinearTransform2d::ImplicitLinearTransform2d ( )

Default constructor. Produces 1-to-1 mapping.

◆ ImplicitLinearTransform2d() [2/2]

InternalZGY::ImplicitLinearTransform2d::ImplicitLinearTransform2d ( const TiePoint pt0,
const TiePoint pt1,
const TiePoint pt2 
)

Construct from three tie-points. Fails by throwing an exception if the tie-points don't span a 2-dimensional space (i.e. lie along a straight line in either space).

Parameters
pt0First tie-point.
pt1Second tie-point.
pt2Third tie-point.

Member Function Documentation

◆ Apply()

void InternalZGY::ImplicitLinearTransform2d::Apply ( value_type *  b,
const value_type *  a 
) const

Convert from space A to space B.

Parameters
bPointer to buffer holding (at least) two elements of value_type which will receive the transformed coordinate in B.
aPointer to buffer holding (at least) two elements of value_type serving as the A coordinate to transform.

◆ Compare()

bool InternalZGY::ImplicitLinearTransform2d::Compare ( const this_type other,
const value_type &  errtol = 0 
) const
Parameters
otherInstance to compare with.
errtolEntry-by-entry absolute error tolerance.
Returns
True if other is equal to self, otherwise false.

◆ Identity()

ImplicitLinearTransform2d InternalZGY::ImplicitLinearTransform2d::Identity ( )
static
Returns
Identity (one-to-one) transform.

◆ makeTiePoint()

static TiePoint InternalZGY::ImplicitLinearTransform2d::makeTiePoint ( )
static

Partial workaround for problems on Windows with forcing instantiation of the above. Define member functions to create instances. Unfortunately this just solves part of the problem, since the compiler may generate calls to the default constructor.

◆ operator!=()

bool InternalZGY::ImplicitLinearTransform2d::operator!= ( const this_type other) const
Parameters
otherInstance to compare with.
Returns
False if other is equal to self, otherwise true.

◆ operator==()

bool InternalZGY::ImplicitLinearTransform2d::operator== ( const this_type other) const
Parameters
otherInstance to compare with.
Returns
True if other is equal to self, otherwise false.

◆ Push()

ImplicitLinearTransform2d & InternalZGY::ImplicitLinearTransform2d::Push ( const this_type other)

Push another transform onto this one, i.e. front-multiply it with this.

Parameters
otherThe other transform.
Returns
Reference to self.

◆ Rotate()

ImplicitLinearTransform2d & InternalZGY::ImplicitLinearTransform2d::Rotate ( value_type  r)
Parameters
rRotation in radians counter-clockwise relative to first axis (polar rotation).
Returns
Reference to self.

◆ Scale()

ImplicitLinearTransform2d & InternalZGY::ImplicitLinearTransform2d::Scale ( value_type  s0,
value_type  s1 
)
Parameters
s0Scaling in first dimension.
s1Scaling in second dimension.
Returns
Reference to self.

◆ Translate()

ImplicitLinearTransform2d & InternalZGY::ImplicitLinearTransform2d::Translate ( value_type  t0,
value_type  t1 
)
Parameters
t0Translation in first dimension.
t1Translation in second dimension.
Returns
Reference to self.

The documentation for this class was generated from the following files: