Commit d7dab33b authored by Andrey Filippov's avatar Andrey Filippov

Added alignment statistics

parent 48ba44a4
......@@ -84,7 +84,6 @@ import loci.formats.FormatException;
//import javax.swing.SwingUtilities;
//import javax.swing.UIManager;
public class Eyesis_Correction extends PlugInFrame implements ActionListener {
/**
*
......@@ -587,6 +586,7 @@ private Panel panel1,
addButton("Rig offset", panelClt4, color_configure);
addButton("Save offset", panelClt4, color_process);
addButton("SHOW extrinsics", panelClt4, color_configure);
addButton("LIST extrinsics", panelClt4, color_configure);
addButton("RIG DSI", panelClt4, color_conf_process);
addButton("MAIN extrinsics", panelClt4, color_process);
addButton("AUX extrinsics", panelClt4, color_process);
......@@ -4579,6 +4579,11 @@ private Panel panel1,
QuadCLT dbg_QUAD_CLT_AUX = QUAD_CLT_AUX;
return;
/* ======================================================================== */
} else if (label.equals("LIST extrinsics")) {
listExtrinsics();
return;
/* ======================================================================== */
} else if (label.equals("Reset GT")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
......@@ -5580,6 +5585,25 @@ private Panel panel1,
return true;
}
// listExtrinsics();
public boolean listExtrinsics() {
String dir= CalibrationFileManagement.selectDirectory(
false, // true, // smart,
false, // newAllowed, // save
"Model directories to scan", // title
"Select", // button
null, // filter
CORRECTION_PARAMETERS.x3dDirectory); //this.sourceDirectory);
if (dir!=null) {
System.out.println("top directory = "+dir);
}
//listExtrinsics(String dir, String mask)
// if (TWO_QUAD_CLT == null) {
// return false;
// }
return TwoQuadCLT.listExtrinsics(dir); // , mask);
}
public boolean showDSI() {
if (TWO_QUAD_CLT == null) {
System.out.println("TWO_QUAD_CLT is not initialized");
......
......@@ -543,7 +543,7 @@ public class GeometryCorrection {
if (Double.isNaN(rms)) {
System.out.println("rms= NaN");
}
if (debugLevel>-4) {
System.out.println("getRigCorrection(): Current RMS = "+rms+ "(debugLevel= "+debugLevel+")");
};
......@@ -953,6 +953,22 @@ public class GeometryCorrection {
System.out.println(" Relative zoom - difference from 1.0 in parts parts per 1/1000 "+ (par_scales[AUX_ZOOM_INDEX] * this.aux_zoom) +"pix");
}
public double getRigOffsetParameter(int indx, boolean inPix)
{
if ((indx <0.0) || (indx >=par_scales.length)){
return Double.NaN;
}
double k = inPix? par_scales[indx] : 1.0;
switch (indx) {
case AUX_AZIMUTH_INDEX: return k * this.aux_azimuth;
case AUX_TILT_INDEX: return k * this.aux_tilt;
case AUX_ROLL_INDEX: return k * this.aux_roll;
case AUX_ZOOM_INDEX: return k * this.aux_zoom;
case AUX_ANGLE_INDEX: return k * this.aux_angle;
case AUX_BASELINE_INDEX: return k * this.baseline; // if inPix - show rig baseline/main baseline
}
return Double.NaN;
}
}
......@@ -967,6 +983,10 @@ public class GeometryCorrection {
this.rigOffset.showRigOffsets();
}
public double getRigOffsetParameter(int indx, boolean inPix) {
return this.rigOffset.getRigOffsetParameter(indx,inPix);
}
public boolean setRigOffsetFromProperies(String parent_prefix,Properties properties) {
RigOffset rigOffset = new RigOffset();
boolean gotit = rigOffset.getProperties(parent_prefix, properties);
......@@ -1248,6 +1268,27 @@ public class GeometryCorrection {
{
return vector[6 + indx] + roll[indx] * Math.PI/180.0;
}
/**
* Return parameter value for reports
* @param indx parameter index (use CorrVector.XXX static integers)
* @param inPix show result in pixels , false - in radians (even for zooms)
* @return parameter value
*/
public double getExtrinsicParameterValue(int indx, boolean inPix) {
if (indx <0) return Double.NaN;
if (indx < ROLL_INDEX) return vector[indx]* (inPix? (1000.0*focalLength /pixelSize): 1.0); // tilt and azimuth
if (indx < LENGTH_ANGLES) return vector[indx]* (inPix? (1000.0*distortionRadius/pixelSize): 1.0); // rolls
if (indx < LENGTH) return vector[indx]* (inPix? (1000.0*distortionRadius/pixelSize): 1.0); // zooms
return Double.NaN;
}
public double getExtrinsicSymParameterValue(int indx, boolean inPix) {
double [] sym_vect = toSymArray(null);
if (indx <0) return Double.NaN;
if (indx < ROLL_INDEX) return sym_vect[indx]* (inPix? (1000.0*focalLength /pixelSize): 1.0); // tilt and azimuth
if (indx < LENGTH_ANGLES) return sym_vect[indx]* (inPix? (1000.0*distortionRadius/pixelSize): 1.0); // rolls
if (indx < LENGTH) return sym_vect[indx]* (inPix? (1000.0*distortionRadius/pixelSize): 1.0); // zooms
return Double.NaN;
}
@Override
public String toString()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment