Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Affine.h
Go to the documentation of this file.
1
#ifndef Affine_h
2
#define Affine_h
3
25
#include <vector>
26
#include "tnt/tnt_array2d.h"
27
28
namespace
Isis {
79
class
Affine
{
80
public
:
81
typedef
TNT::Array2D<double> AMatrix;
82
Affine
();
83
Affine
(
const
AMatrix &a);
84
~Affine
();
85
void
Solve
(
const
double
x
[],
const
double
y
[],
86
const
double
xp
[],
const
double
yp
[],
int
n);
87
static
AMatrix
getIdentity
();
88
void
Identity
();
89
void
Translate
(
double
tx,
double
ty);
90
void
Rotate
(
double
rot);
91
void
Scale
(
double
scaleFactor);
92
93
void
Compute
(
double
x,
double
y);
94
96
double
xp
()
const
{
97
return
p_xp
;
98
};
99
101
double
yp
()
const
{
102
return
p_yp
;
103
};
104
105
void
ComputeInverse
(
double
xp,
double
yp);
106
108
double
x
()
const
{
109
return
p_x
;
110
};
111
113
double
y
()
const
{
114
return
p_y
;
115
};
116
117
std::vector<double>
Coefficients
(
int
var);
118
std::vector<double>
InverseCoefficients
(
int
var);
120
AMatrix
Forward
()
const
{
121
return
(
p_matrix
.copy());
122
}
124
AMatrix
Inverse
()
const
{
125
return
(
p_invmat
.copy());
126
}
127
128
private
:
129
AMatrix
p_matrix
;
130
AMatrix
p_invmat
;
131
132
double
p_x
;
133
double
p_y
;
134
double
p_xp
;
135
double
p_yp
;
136
137
void
checkDims
(
const
AMatrix &am)
const
;
138
AMatrix
invert
(
const
AMatrix &a)
const
;
139
};
140
};
141
142
#endif
143