Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ApolloPanIO.h
Go to the documentation of this file.
1
#ifndef ApolloPanIO_h
2
#define ApolloPanIO_h
3
27
namespace
Isis {
28
/* Numbering scheme for the fiducial marks
29
* (gages on the right)
30
* :--------------------------------------------------------------------------------------------:0
31
* :0 2 4 .... ... 84 86 88:0
32
* : :0
33
* :1 3 5 .... ... 85 87 89:0
34
* ----------------------------------------------------------------------------------------------0
35
*/
36
37
56
class
ApolloPanIO
57
{
58
private
:
59
/* C style structure for storing the calculation optimized parameters of a foreward and
60
* reverse 2D affine transformation
61
*/
62
typedef
struct
Affine2D
{
63
int
flag;
//solve flag
64
double
A2I[6];
//transformation coefficients to go to image coordinates
65
double
A2M[6];
//transformation coefficients to go to machine coordinates
66
double
rotM[2];
//coefficients to rotate machine coordinates so that the right edge of the region is vertical
67
double
rotI[2];
//coefficients to rotate Image coordinates so that the right edge of the region is vertical
68
double
mI;
//max rotated image y coordinate in the region
69
double
mM;
//max rotate machine y coordinate in the region
70
int
indeces[2];
//indeces of the first and last fiducial marks included in this region
71
}
Affine2D
;
72
74
typedef
struct
FidObs
{
75
int
flag;
//flag to tell if the observation has been made
76
double
mach[2];
//machine coordinates of the fiducial mark
77
double
image[2];
//theoretically perfect image coordinates
78
double
residuals[2];
//residuals of the fiducial mark measurement in machine coordinates
79
}
FidObs
;
80
81
Affine2D
affines[44];
//an array of discreet affine transformations pertaining to regions of the image (there can never be more than 44)
82
83
FidObs
obs[90];
//array to hold all possible observations of fiducial marks
84
85
int
n;
//the number of affines used to model the image
86
88
double
maxR
;
90
double
meanR
;
92
double
stdevR
;
93
94
void
calc_residual_stats
();
95
96
public
:
97
ApolloPanIO
();
98
99
~ApolloPanIO
();
100
101
void
initialize
();
102
103
int
fiducialObservation
(
int
fiducialNumber,
double
machine_x,
double
machine_y);
104
105
int
clearFiducialObservation
(
int
fiducialNumber);
106
107
int
computeInteriorOrienation
();
108
109
int
machine2Image
(
double
*machineX,
double
*machineY);
110
111
int
machine2Image
(
double
machineX,
double
machineY,
double
*imageX,
double
*imageY);
112
113
int
image2Machine
(
double
*imageX,
double
*imageY);
114
115
int
image2Machine
(
double
imageX,
double
imageY,
double
*machineX,
double
*machineY);
116
117
double
stdevResiduals
();
118
double
meanResiduals
();
119
double
maxResiduals
();
120
};
121
}
//end namespace Isis
122
#endif