publicintstationNumber=0;// changes when camera/goniometer is moved to new position
...
...
@@ -448,17 +448,19 @@ import ij.text.TextWindow;
// public GridImageParameters firstImage=null; // first non-null image in the sert (update to have current parameters?)
publicdoubletimeStamp;
publicint[]motors=null;
publicdoublegoniometerAxial=Double.NaN;
publicdoublegoniometerTilt=Double.NaN;
publicdoublegoniometerAxial=Double.NaN;// 6
publicdoublegoniometerTilt=Double.NaN;// 7
publicdoubleinterAxisDistance;// 8 distance in mm between two goniometer axes
publicdoubleinterAxisAngle;// 9 angle in degrees between two goniometer axes minus 90. negative if "vertical" axis is rotated
publicdoublehorAxisErrPhi;//10 angle in degrees "horizontal" goniometer axis is rotated around target Y axis from target X axis (CW)
publicdoublehorAxisErrPsi;//11 angle in degrees "horizontal" goniometer axis is rotated around moving X axis (up)
publicdoubleentrancePupilForward;//12 common to all lenses - distance from the sensor to the lens entrance pupil
publicdoublecenterAboveHorizontal;//13 camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
publicdoublecenterAboveHorizontal;//13 camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
publicdouble[]GXYZ=newdouble[3];//14 (12) coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
// this.GXYZ[stationNumber][1], //15 (13) y
// this.GXYZ[stationNumber][2], //16 (14) z
publicdoubleneckRight;//17 angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdoubleneckBack;//18 angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[]neckXZ=newdouble[2];//19,20 optical head offset in mm relative to the mount point (centerAboveHorizontal as Y)
publicbooleanorientationEstimated=true;// orientation is estimated from other stes, not adjusted by LMA
publicdoublesetWeight=0.0;// weight of this set when calculating errors
for (int j=0;j<this.gIS[i].imageSet.length;j++) if (this.gIS[i].imageSet[j]!=null) setGA(this.gIS[i].imageSet[j].imgNumber,this.gIS[i].goniometerAxial);
this.gIS[i].orientationEstimated=true;
if (this.debugLevel>1) {
System.out.print(String.format("Setting goniometerAxial for the image set #%4d (%18.6f) to ", i, this.gIS[i].timeStamp));
if (overwriteAll || Double.isNaN(this.gIS[i].goniometerTilt )){
this.gIS[i].goniometerTilt= -esp.theta;
for (int j=0;j<this.gIS[i].imageSet.length;j++) if (this.gIS[i].imageSet[j]!=null) setGH(this.gIS[i].imageSet[j].imgNumber,this.gIS[i].goniometerTilt);
this.gIS[i].orientationEstimated=true;
if (this.debugLevel>1) {
System.out.print(String.format("Setting goniometerTilt for the image set #%4d (%18.6f) to ", i, this.gIS[i].timeStamp));
publicdouble[]entrancePupilForward;// common to all lenses - distance from the sensor to the lens entrance pupil
publicdouble[]centerAboveHorizontal;// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each SFE)
publicdouble[][]GXYZ=null;// [numStations]{x,y,z} coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
publicdouble[]neckRight;// angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[]neckBack;// angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[][]neckXZ=null;// optical head offset in mm relative to the mount point (centerAboveHorizontal as Y)
// non-adjustable parameters, not parts of vector
publicintnumStations;
...
...
@@ -114,7 +118,12 @@ import ij.gui.GenericDialog;
{10.0,2.0,0.0,1.0},// 13 centerAboveHorizontal
{10.0,2.0,0.0,1.0},// 14 GXYZ0
{10.0,2.0,0.0,1.0},// 15 GXYZ1
{10.0,2.0,0.0,1.0}// 16 GXYZ2
{10.0,2.0,0.0,1.0},// 16 GXYZ2
{10.0,0.2,0.0,1.0},// 17 neckRight
{10.0,0.2,0.0,1.0},// 18 neckBack
{10.0,2.0,0.0,1.0},// 19 neckXZ0
{10.0,2.0,0.0,1.0}// 20 neckXZ0
};
publicbooleanisTripod(){
...
...
@@ -345,6 +354,10 @@ import ij.gui.GenericDialog;
doubleGXYZ_0,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleGXYZ_1,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleGXYZ_2,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
doubleneck_x,
doubleneck_z,
intsensorWidth,
intsensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -372,6 +385,7 @@ import ij.gui.GenericDialog;
booleaninvertUnmarkedLwirGrid
){
double[]GXYZ={GXYZ_0,GXYZ_1,GXYZ_2};
double[]neck_xz={neck_x,neck_z};
setSameEyesisCameraParameters(
numStations,
isTripod,
...
...
@@ -387,6 +401,9 @@ import ij.gui.GenericDialog;
entrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
centerAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
neck_right,
neck_back,
neck_xz,
sensorWidth,
sensorHeight,
shrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -429,6 +446,9 @@ import ij.gui.GenericDialog;
doubleentrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
doublecenterAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
double[]GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
double[]neck_xz,
intsensorWidth,
intsensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -470,6 +490,9 @@ import ij.gui.GenericDialog;
entrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
centerAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
neck_right,
neck_back,
neck_xz,
sensorWidth,
sensorHeight,
shrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -512,6 +535,9 @@ import ij.gui.GenericDialog;
doubleentrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
doublecenterAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
double[]GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
double[]neck_xz,
intdefaultSensorWidth,
intdefaultSensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -568,7 +594,10 @@ import ij.gui.GenericDialog;
this.horAxisErrPsi=newdouble[numStations];
this.entrancePupilForward=newdouble[numStations];// common to all lenses - distance from the sensor to the lens entrance pupil
this.centerAboveHorizontal=newdouble[numStations];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
this.entrancePupilForward[numStation]=entrancePupilForward;// common to all lenses - distance from the sensor to the lens entrance pupil
this.centerAboveHorizontal[numStation]=centerAboveHorizontal;// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
destination.entrancePupilForward=newdouble[destination.numStations];// common to all lenses - distance from the sensor to the lens entrance pupil
destination.centerAboveHorizontal=newdouble[destination.numStations];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
destination.entrancePupilForward[numStation]=source.entrancePupilForward[srcNumStation];// common to all lenses - distance from the sensor to the lens entrance pupil
destination.centerAboveHorizontal[numStation]=source.centerAboveHorizontal[srcNumStation];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
if(update[14])this.GXYZ[stationNumber][0]=parVect[14];//14 coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
if(update[15])this.GXYZ[stationNumber][1]=parVect[15];//15 y
if(update[16])this.GXYZ[stationNumber][2]=parVect[16];//16 z