Commit 71a02244 authored by Andrey Filippov's avatar Andrey Filippov

Updating history path on load

parent 7b0865f3
...@@ -9220,10 +9220,13 @@ if (MORE_BUTTONS) { ...@@ -9220,10 +9220,13 @@ if (MORE_BUTTONS) {
!interactive, // false, // true, // boolean smart, // do not open dialog if default matches !interactive, // false, // true, // boolean smart, // do not open dialog if default matches
FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile, // FOCUSING_FIELD_HISTORY_PATH, //"",//); //String defaultPath); // AtomicInteger stopRequested FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile, // FOCUSING_FIELD_HISTORY_PATH, //"",//); //String defaultPath); // AtomicInteger stopRequested
this.SYNC_COMMAND.stopRequested); this.SYNC_COMMAND.stopRequested);
String path=FOCUSING_FIELD.getHistoryPath();
if (path==null) return false; // did not load
FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile=path;
FOCUSING_FIELD.setDebugLevel(DEBUG_LEVEL); FOCUSING_FIELD.setDebugLevel(DEBUG_LEVEL);
FOCUSING_FIELD.setAdjustMode(false); FOCUSING_FIELD.setAdjustMode(false);
if (PROPERTIES!=null) FOCUSING_FIELD.getProperties("FOCUSING_FIELD.", PROPERTIES,true); // keep distortions center from history if (PROPERTIES!=null) FOCUSING_FIELD.getProperties("FOCUSING_FIELD.", PROPERTIES,true); // keep distortions center from history
System.out.println("Loaded FocusingField"); System.out.println("Loaded FocusingField from "+path);
if (!FOCUSING_FIELD.configureDataVector( if (!FOCUSING_FIELD.configureDataVector(
true, // boolean silent (maybe add option with false to change number of parameters?) true, // boolean silent (maybe add option with false to change number of parameters?)
"Configure curvature - TODO: fix many settings restored from properties", // String title "Configure curvature - TODO: fix many settings restored from properties", // String title
...@@ -9240,8 +9243,6 @@ if (MORE_BUTTONS) { ...@@ -9240,8 +9243,6 @@ if (MORE_BUTTONS) {
double rms= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, false); double rms= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, false);
double rms_pure= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, true); double rms_pure= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, true);
System.out.println("rms="+rms+", rms_pure="+rms_pure); System.out.println("rms="+rms+", rms_pure="+rms_pure);
return true; // add OK/fail return true; // add OK/fail
} }
......
...@@ -202,6 +202,7 @@ public class FocusingField { ...@@ -202,6 +202,7 @@ public class FocusingField {
public String serialNumber; public String serialNumber;
public String lensSerial; // if null - do not add average public String lensSerial; // if null - do not add average
public String comment; public String comment;
public String historyPath=null;
public int sensorWidth; public int sensorWidth;
public int sensorHeight; public int sensorHeight;
// public static final double PIXEL_SIZE=0.0022; // mm // public static final double PIXEL_SIZE=0.0022; // mm
...@@ -4781,6 +4782,7 @@ public boolean LevenbergMarquardt( ...@@ -4781,6 +4782,7 @@ public boolean LevenbergMarquardt(
if (debugLevel>0){ if (debugLevel>0){
System.out.println("Loaded measurement history "+pathname); System.out.println("Loaded measurement history "+pathname);
} }
this.historyPath=pathname;
return true; return true;
} }
public void saveXML( public void saveXML(
...@@ -4831,6 +4833,10 @@ public boolean LevenbergMarquardt( ...@@ -4831,6 +4833,10 @@ public boolean LevenbergMarquardt(
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
this.historyPath=path;
}
public String getHistoryPath(){
return this.historyPath;
} }
public void testMeasurement(){ public void testMeasurement(){
GenericDialog gd = new GenericDialog("Select measurement"); GenericDialog gd = new GenericDialog("Select measurement");
......
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