Commit 1e93c781 authored by Andrey Filippov's avatar Andrey Filippov

Resolving slf4j issues

parent aaf90b6f
...@@ -91,8 +91,9 @@ public class EyesisCorrections { ...@@ -91,8 +91,9 @@ public class EyesisCorrections {
){ ){
this.correctionsParameters=correctionsParameters; this.correctionsParameters=correctionsParameters;
this.stopRequested=stopRequested; this.stopRequested=stopRequested;
setDebug(-2); // setDebug(-2);
} }
/*
public void setDebug(int debugLevel){ public void setDebug(int debugLevel){
this.debugLevel=debugLevel; this.debugLevel=debugLevel;
String LOG_LEVEL = "OFF"; String LOG_LEVEL = "OFF";
...@@ -114,9 +115,9 @@ public class EyesisCorrections { ...@@ -114,9 +115,9 @@ public class EyesisCorrections {
loci.common.DebugTools.setRootLevel(LOG_LEVEL); loci.common.DebugTools.setRootLevel(LOG_LEVEL);
// } // }
System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL); System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL);
*/
} }
*/
/*
public void setDebugOnce(int debugLevel){ public void setDebugOnce(int debugLevel){
this.debugLevel=debugLevel; this.debugLevel=debugLevel;
String LOG_LEVEL = "OFF"; String LOG_LEVEL = "OFF";
...@@ -135,7 +136,19 @@ public class EyesisCorrections { ...@@ -135,7 +136,19 @@ public class EyesisCorrections {
System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL); System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL);
return; return;
} }
*/
public static String stringLogLevel(int ilev) {
String LOG_LEVEL = "OFF";
switch (ilev) {
case -2: LOG_LEVEL = "FATAL"; break;
case -1: LOG_LEVEL = "ERROR"; break;
case 0: LOG_LEVEL = "WARN"; break;
case 1: LOG_LEVEL = "INFO"; break;
case 2: LOG_LEVEL = "DEBUG"; break;
default: LOG_LEVEL = "OFF";
}
return LOG_LEVEL;
}
public int getNumChannels(){return (this.usedChannels!=null)?this.usedChannels.length:0;} public int getNumChannels(){return (this.usedChannels!=null)?this.usedChannels.length:0;}
......
...@@ -1619,6 +1619,32 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -1619,6 +1619,32 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} }
} }
// codex 2026-01-25: set our package to LOG_LEVEL while keeping 3rd-party quiet
private void applySelectiveLogLevels(String logLevel) {
if (logLevel == null || logLevel.isEmpty()) {
return;
}
try {
Object factory = org.slf4j.LoggerFactory.getILoggerFactory();
if (factory instanceof ch.qos.logback.classic.LoggerContext) {
ch.qos.logback.classic.LoggerContext ctx =
(ch.qos.logback.classic.LoggerContext) factory;
ch.qos.logback.classic.Level mine =
ch.qos.logback.classic.Level.toLevel(logLevel, ch.qos.logback.classic.Level.WARN);
ch.qos.logback.classic.Level third = ch.qos.logback.classic.Level.ERROR;
// 3rd-party quiet
ctx.getLogger("loci").setLevel(third);
ctx.getLogger("ome").setLevel(third);
ctx.getLogger("org.openmicroscopy").setLevel(third);
ctx.getLogger("loci.common.services.ServiceFactory").setLevel(third);
// our code adjustable
ctx.getLogger("com.elphel.imagej").setLevel(mine);
}
} catch (Throwable t) {
System.out.println("Selective log level override failed: " + t.getMessage());
}
}
// codex 2026-01-25: reduce java.util.logging output if Bio-Formats uses JUL // codex 2026-01-25: reduce java.util.logging output if Bio-Formats uses JUL
private void applyJulRootLevel(String value) { private void applyJulRootLevel(String value) {
java.util.logging.Level level = julLevel(value); java.util.logging.Level level = julLevel(value);
...@@ -1646,7 +1672,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -1646,7 +1672,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
public void processFiles() { public void processFiles() {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
String configPath = null; String configPath = null;
if (!headless && EYESIS_CORRECTIONS.correctionsParameters.saveSettings) { if (!headless && EYESIS_CORRECTIONS.correctionsParameters.saveSettings) {
configPath = EYESIS_CORRECTIONS.correctionsParameters.selectResultsDirectory(true, true); configPath = EYESIS_CORRECTIONS.correctionsParameters.selectResultsDirectory(true, true);
...@@ -1734,17 +1759,20 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -1734,17 +1759,20 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
default: default:
LOG_LEVEL = "OFF"; LOG_LEVEL = "OFF";
} }
LOG_LEVEL = "ERROR"; // setting it here to shut up? // LOG_LEVEL = "ERROR"; // setting it here to shut up?
// LOG_LEVEL = "WARN"; // setting it here to shut up? works
// codex 2026-01-25: keep 3rd-party logs quiet, adjust only our package
applySelectiveLogLevels(LOG_LEVEL);
/*
boolean LOG_LEVEL_SET = loci.common.DebugTools.enableLogging(LOG_LEVEL); boolean LOG_LEVEL_SET = loci.common.DebugTools.enableLogging(LOG_LEVEL);
if (!LOG_LEVEL_SET) { // only first time true if (!LOG_LEVEL_SET) { // only first time true
loci.common.DebugTools.setRootLevel(LOG_LEVEL); loci.common.DebugTools.setRootLevel(LOG_LEVEL);
} }
*/
System.out.println("DEBUG_LEVEL = " + DEBUG_LEVEL + ", CLT_PARAMETERS.lwir.getDebugLevel() = " System.out.println("DEBUG_LEVEL = " + DEBUG_LEVEL + ", CLT_PARAMETERS.lwir.getDebugLevel() = "
+ CLT_PARAMETERS.lwir.getDebugLevel() + " LOG_LEVEL=" + LOG_LEVEL + " LOG_LEVEL_SET=" + CLT_PARAMETERS.lwir.getDebugLevel() + " LOG_LEVEL=" + LOG_LEVEL); // + " LOG_LEVEL_SET="
+ LOG_LEVEL_SET); // + LOG_LEVEL_SET);
//https://www.javadoc.io/doc/org.openmicroscopy/ome-common/6.0.5/loci/common/DebugTools.html#enableLogging(java.lang.String) //https://www.javadoc.io/doc/org.openmicroscopy/ome-common/6.0.5/loci/common/DebugTools.html#enableLogging(java.lang.String)
// Temporary overwrite with public static boolean enableIJLogging​(boolean debug)
loci.common.DebugTools.enableIJLogging(false);
} }
/* ======================================================================== */ /* ======================================================================== */
...@@ -2148,41 +2176,26 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -2148,41 +2176,26 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("Save") || label.equals("Save Clean")) { } else if (label.equals("Save") || label.equals("Save Clean")) {
// If saved just after restore, QUAD_CLT==null and QUAD_CLT_AUX==null and are // If saved just after restore, QUAD_CLT==null and QUAD_CLT_AUX==null and are
// not saved // not saved
int dbg_magic = 4;
System.out.println("dbg_magic="+dbg_magic);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
System.out.println("Created new QuadCLT instance, will need to read CLT kernels"); System.out.println("Created new QuadCLT instance, will need to read CLT kernels");
} }
} }
if (dbg_magic == 1) {
return;
}
if (QUAD_CLT_AUX == null) { if (QUAD_CLT_AUX == null) {
if (EYESIS_CORRECTIONS_AUX == null) { if (EYESIS_CORRECTIONS_AUX == null) {
EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested, EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
} }
if (dbg_magic == 2) {
return;
}
QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX, QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
System.out.println("Created new QuadCLT instance, will need to read CLT kernels for aux camera"); System.out.println("Created new QuadCLT instance, will need to read CLT kernels for aux camera");
} }
if (dbg_magic == 3) {
return;
}
} }
if (label.equals("Save Clean")) { if (label.equals("Save Clean")) {
PROPERTIES = new Properties(); PROPERTIES = new Properties();
} }
if (dbg_magic == 4) {
return;
}
saveProperties( saveProperties(
null, null,
CORRECTION_PARAMETERS.resultsDirectory, CORRECTION_PARAMETERS.resultsDirectory,
...@@ -4069,7 +4082,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -4069,7 +4082,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("DCT process files")) { } else if (label.equals("DCT process files")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (EYESIS_DCT == null) { if (EYESIS_DCT == null) {
EYESIS_DCT = new EyesisDCT(PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS, DCT_PARAMETERS); EYESIS_DCT = new EyesisDCT(PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS, DCT_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -4661,7 +4673,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -4661,7 +4673,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("DCT test 4")) { } else if (label.equals("DCT test 4")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
String configPath = getSaveCongigPath(); String configPath = getSaveCongigPath();
if (configPath.equals("ABORT")) if (configPath.equals("ABORT"))
return; return;
...@@ -4926,7 +4937,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -4926,7 +4937,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
return; return;
} else if (label.equals("CLT process files")) { } else if (label.equals("CLT process files")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -4975,7 +4985,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -4975,7 +4985,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("CLT process sets")) { } else if (label.equals("CLT process sets")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -5038,7 +5047,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5038,7 +5047,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
boolean apply_corr = label.equals("CLT apply fine corr"); boolean apply_corr = label.equals("CLT apply fine corr");
boolean infinity_corr = label.equals("CLT infinity corr"); boolean infinity_corr = label.equals("CLT infinity corr");
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -5185,7 +5193,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5185,7 +5193,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested, EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
} }
EYESIS_CORRECTIONS_AUX.setDebug(DEBUG_LEVEL);
if (QUAD_CLT_AUX == null) { if (QUAD_CLT_AUX == null) {
QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX, QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
...@@ -5368,7 +5375,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5368,7 +5375,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("CLT disparity scan")) { } else if (label.equals("CLT disparity scan")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -5451,7 +5457,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5451,7 +5457,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
boolean dry_run = label.equals("DRY RUN");// init kernel/geometry only boolean dry_run = label.equals("DRY RUN");// init kernel/geometry only
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
clt3d(adjust_extrinsics, adjust_poly, dry_run); clt3d(adjust_extrinsics, adjust_poly, dry_run);
return; return;
...@@ -5459,18 +5464,15 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5459,18 +5464,15 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
boolean adjust_extrinsics = label.equals("AUX extrinsics") || label.equals("AUX Poly corr"); boolean adjust_extrinsics = label.equals("AUX extrinsics") || label.equals("AUX Poly corr");
boolean adjust_poly = label.equals("AUX Poly corr"); boolean adjust_poly = label.equals("AUX Poly corr");
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
clt3d_aux(adjust_extrinsics, adjust_poly); clt3d_aux(adjust_extrinsics, adjust_poly);
return; return;
} else if (label.equals("Main to AUX") || label.equals("Main img AUX")) { } else if (label.equals("Main to AUX") || label.equals("Main img AUX")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
mainToAux(label.equals("Main img AUX")); mainToAux(label.equals("Main img AUX"));
return; return;
// //
} else if (label.equals("CLT planes")) { } else if (label.equals("CLT planes")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
System.out.println("QUAD_CLT is null, nothing to show"); System.out.println("QUAD_CLT is null, nothing to show");
return; return;
...@@ -5483,7 +5485,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5483,7 +5485,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("Periodic")) { } else if (label.equals("Periodic")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
System.out.println("QUAD_CLT is null, nothing to show"); System.out.println("QUAD_CLT is null, nothing to show");
return; return;
...@@ -5496,7 +5497,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5496,7 +5497,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("CLT ASSIGN")) { } else if (label.equals("CLT ASSIGN")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
System.out.println("QUAD_CLT is null, nothing to show"); System.out.println("QUAD_CLT is null, nothing to show");
return; return;
...@@ -5518,7 +5518,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5518,7 +5518,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("CLT OUT 3D")) { } else if (label.equals("CLT OUT 3D")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
System.out.println("QUAD_CLT is null, nothing to show (will add previous steps)"); System.out.println("QUAD_CLT is null, nothing to show (will add previous steps)");
return; return;
...@@ -5542,7 +5541,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5542,7 +5541,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
} else if (label.equals("CLT batch process")) { } else if (label.equals("CLT batch process")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (QUAD_CLT == null) { if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS); QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) { if (DEBUG_LEVEL > 0) {
...@@ -5620,39 +5618,33 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5620,39 +5618,33 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("CLT 2*4 images")) { // never used } else if (label.equals("CLT 2*4 images")) { // never used
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
getPairImages(); getPairImages();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Rig8 images")) { } else if (label.equals("Rig8 images")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
getPairImages2(); getPairImages2();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("GPU simulate")) { } else if (label.equals("GPU simulate")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
generateGPUDebugFiles(); generateGPUDebugFiles();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("GPU RUN")) { } else if (label.equals("GPU RUN")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
getPairImages2Gpu(); getPairImages2Gpu();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("ShowGPU")) { } else if (label.equals("ShowGPU")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
showImageFromGPU(); showImageFromGPU();
return; return;
// //
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("RIG extrinsics")) { } else if (label.equals("RIG extrinsics")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
infinityRig(); infinityRig();
return; return;
/* ======================================================================== */ /* ======================================================================== */
...@@ -5710,7 +5702,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5710,7 +5702,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("LIST extrinsics")) { } else if (label.equals("LIST extrinsics")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (EYESIS_CORRECTIONS_AUX == null) { if (EYESIS_CORRECTIONS_AUX == null) {
EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested, EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
...@@ -5720,72 +5711,61 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5720,72 +5711,61 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("ML recalc")) { } else if (label.equals("ML recalc")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
mlRecalc(); mlRecalc();
return; return;
// //
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("DSI histogram")) { } else if (label.equals("DSI histogram")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
dsiHistogram(); dsiHistogram();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Reset GT")) { } else if (label.equals("Reset GT")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
resetGroundTruth(); resetGroundTruth();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Ground truth")) { } else if (label.equals("Ground truth")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
groundTruth(); groundTruth();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("RIG DSI")) { } else if (label.equals("RIG DSI")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
rigDSI(); rigDSI();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Show biscan")) { } else if (label.equals("Show biscan")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
showBiScan(); showBiScan();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Poles GT")) { } else if (label.equals("Poles GT")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
processPoles(); processPoles();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("CLT planes")) { } else if (label.equals("CLT planes")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
rigPlanes(); rigPlanes();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("ML export")) { } else if (label.equals("ML export")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
exportMLData(); exportMLData();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("JP4 copy")) { } else if (label.equals("JP4 copy")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
copyJP4src(); copyJP4src();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Rig batch")) { } else if (label.equals("Rig batch")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
batchRig(); batchRig();
return; return;
...@@ -5793,38 +5773,19 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5793,38 +5773,19 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("LWIR batch")) { } else if (label.equals("LWIR batch")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
batchLwir(); batchLwir();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Test")) { } else if (label.equals("Inter Test")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
testInterScene(false); testInterScene(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Build Series")) { } else if (label.equals("Aux Build Series")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
/// EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
/*
if (QUAD_CLT == null) {
QUAD_CLT = new QuadCLT(QuadCLT.PREFIX, PROPERTIES, EYESIS_CORRECTIONS, CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0) {
System.out.println("Created new QuadCLT instance, will need to read CLT kernels");
}
}
if (QUAD_CLT_AUX == null) {
if (EYESIS_CORRECTIONS_AUX == null) {
EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested,
CORRECTION_PARAMETERS.getAux());
}
QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX,
CORRECTION_PARAMETERS.getAux());
}
*/
buildSeries( buildSeries(
true, true,
0); // int cuas_proc_mode); // 0 - old, 1 combine scene series) {); 0); // int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
...@@ -5832,7 +5793,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5832,7 +5793,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("CUAS Combine")) { } else if (label.equals("CUAS Combine")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
buildSeries( buildSeries(
true, true,
...@@ -5842,7 +5802,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5842,7 +5802,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("CUAS Video")) { } else if (label.equals("CUAS Video")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
buildSeries( buildSeries(
true, true,
...@@ -5851,49 +5810,42 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5851,49 +5810,42 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Inter Test")) { } else if (label.equals("Aux Inter Test")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
testInterScene(true); testInterScene(true);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Pairs")) { } else if (label.equals("Inter Pairs")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
interPairsLMA(false); interPairsLMA(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Inter Pairs")) { } else if (label.equals("Aux Inter Pairs")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
interPairsLMA(true); interPairsLMA(true);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Series")) { } else if (label.equals("Inter Series")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
interSeriesLMA(false); interSeriesLMA(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Inter Series")) { } else if (label.equals("Aux Inter Series")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
interSeriesLMA(true); interSeriesLMA(true);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Accumulate")) { } else if (label.equals("Inter Accumulate")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneAccumulate(false); intersceneAccumulate(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Inter Accumulate")) { } else if (label.equals("Aux Inter Accumulate")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneAccumulate(true); intersceneAccumulate(true);
return; return;
...@@ -5901,28 +5853,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5901,28 +5853,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Noise")) { } else if (label.equals("Inter Noise")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoise(false, false, false); // boolean bayer_artifacts_debug); intersceneNoise(false, false, false); // boolean bayer_artifacts_debug);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Noise Aux")) { } else if (label.equals("Inter Noise Aux")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoise(true, false, false); // boolean bayer_artifacts_debug); intersceneNoise(true, false, false); // boolean bayer_artifacts_debug);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Intra ML")) { } else if (label.equals("Inter Intra ML")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
inter_intra_export(true); inter_intra_export(true);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Batch Noise Aux")) { } else if (label.equals("Batch Noise Aux")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoise(true, true, false); // boolean bayer_artifacts_debug); intersceneNoise(true, true, false); // boolean bayer_artifacts_debug);
return; return;
...@@ -5930,7 +5878,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5930,7 +5878,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter Debug Noise")) { } else if (label.equals("Inter Debug Noise")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoise(false, false, true); // boolean bayer_artifacts_debug); intersceneNoise(false, false, true); // boolean bayer_artifacts_debug);
return; return;
...@@ -5938,7 +5885,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5938,7 +5885,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Noise Stats")) { } else if (label.equals("Noise Stats")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoiseStats(false); intersceneNoiseStats(false);
return; return;
...@@ -5946,7 +5892,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5946,7 +5892,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Noise Stats Aux")) { } else if (label.equals("Noise Stats Aux")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
intersceneNoiseStats(true); intersceneNoiseStats(true);
return; return;
...@@ -5954,14 +5899,12 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5954,14 +5899,12 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Colorize Depth")) { } else if (label.equals("Colorize Depth")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
coloriseDepthMap(); coloriseDepthMap();
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Test 1D")) { } else if (label.equals("Test 1D")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
test1d(); test1d();
return; return;
...@@ -5969,28 +5912,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -5969,28 +5912,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Inter LMA")) { } else if (label.equals("Inter LMA")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
testInterLMA(false); testInterLMA(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux Inter LMA")) { } else if (label.equals("Aux Inter LMA")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
testInterLMA(true); testInterLMA(true);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Main LY series")) { } else if (label.equals("Main LY series")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
adjustLYSeries(false); adjustLYSeries(false);
return; return;
/* ======================================================================== */ /* ======================================================================== */
} else if (label.equals("Aux LY series")) { } else if (label.equals("Aux LY series")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
adjustLYSeries(true); adjustLYSeries(true);
return; return;
...@@ -6164,7 +6103,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -6164,7 +6103,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
CALIBRATION_ILLUSTRATION); CALIBRATION_ILLUSTRATION);
} else if (label.equals("Super batch")) { } else if (label.equals("Super batch")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
String [] configs = loadMultiProperties( String [] configs = loadMultiProperties(
CORRECTION_PARAMETERS.resultsDirectory, // String directory, CORRECTION_PARAMETERS.resultsDirectory, // String directory,
...@@ -6265,16 +6203,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -6265,16 +6203,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
return; return;
} else if (label.equals("Build World")) { } else if (label.equals("Build World")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
buildLWIRWorld(true); buildLWIRWorld(true);
return; return;
} else if (label.equals("Test IMX5")) { } else if (label.equals("Test IMX5")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true; CLT_PARAMETERS.batch_run = true;
String imx_logs = CORRECTION_PARAMETERS.getImsSourceDirectory(); // sourceImsDirectory; String imx_logs = CORRECTION_PARAMETERS.getImsSourceDirectory(); // sourceImsDirectory;
/// String debug_path = null; // CORRECTION_PARAMETERS.getImsPrintDirectory()+Prefs.getFileSeparator()+"debug_local_master";
String debug_path = CORRECTION_PARAMETERS.getImsPrintDirectory()+Prefs.getFileSeparator()+"debug_local_master"; String debug_path = CORRECTION_PARAMETERS.getImsPrintDirectory()+Prefs.getFileSeparator()+"debug_local_master";
if ((imx_logs == null) || imx_logs.equals("")) { if ((imx_logs == null) || imx_logs.equals("")) {
System.out.println("sourceImsDirectory is not set. Use Setup CLT Batch parameters to define it."); System.out.println("sourceImsDirectory is not set. Use Setup CLT Batch parameters to define it.");
...@@ -6334,21 +6269,17 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -6334,21 +6269,17 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
// End of buttons code // End of buttons code
} else if (label.equals("Show mice")) { } else if (label.equals("Show mice")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
ImagePlus imp_src = WindowManager.getCurrentImage(); ImagePlus imp_src = WindowManager.getCurrentImage();
ImagePlus imp_mice = subtractAverage(imp_src); ImagePlus imp_mice = subtractAverage(imp_src);
imp_mice.show(); imp_mice.show();
} else if (label.equals("Set pair")) { } else if (label.equals("Set pair")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
ComboMatch.openTestPair(); ComboMatch.openTestPair();
} else if (label.equals("Warp pair")) { } else if (label.equals("Warp pair")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
ComboMatch.testPair(); ComboMatch.testPair();
} else if (label.equals("Read Tiff")) { } else if (label.equals("Read Tiff")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
ImagePlus imp_sel = WindowManager.getCurrentImage(); ImagePlus imp_sel = WindowManager.getCurrentImage();
if (imp_sel == null) { if (imp_sel == null) {
IJ.showMessage("Error", "No images selected"); IJ.showMessage("Error", "No images selected");
...@@ -6364,7 +6295,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -6364,7 +6295,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
// ComboMatch.testReadTiff(); // ComboMatch.testReadTiff();
} else if (label.equals("Ortho") || label.equals("Ortho Pairs") || label.equals("Extract Objects") || label.equals("Manual pair")) { } else if (label.equals("Ortho") || label.equals("Ortho Pairs") || label.equals("Extract Objects") || label.equals("Manual pair")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL; DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
if (GPU_TILE_PROCESSOR == null) { if (GPU_TILE_PROCESSOR == null) {
try { try {
GPU_TILE_PROCESSOR = new GPUTileProcessor(CORRECTION_PARAMETERS.tile_processor_gpu); GPU_TILE_PROCESSOR = new GPUTileProcessor(CORRECTION_PARAMETERS.tile_processor_gpu);
...@@ -6728,7 +6658,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -6728,7 +6658,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested, EYESIS_CORRECTIONS_AUX = new EyesisCorrections(SYNC_COMMAND.stopRequested,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
} }
EYESIS_CORRECTIONS_AUX.setDebug(DEBUG_LEVEL);
if (QUAD_CLT_AUX == null) { if (QUAD_CLT_AUX == null) {
QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX, QUAD_CLT_AUX = new QuadCLT(QuadCLT.PREFIX_AUX, PROPERTIES, EYESIS_CORRECTIONS_AUX,
CORRECTION_PARAMETERS.getAux()); CORRECTION_PARAMETERS.getAux());
...@@ -7994,6 +7923,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -7994,6 +7923,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
public boolean buildSeries( public boolean buildSeries(
boolean use_aux, boolean use_aux,
int cuas_proc_mode) { // 0 - old, 1 combine scene series) { int cuas_proc_mode) { // 0 - old, 1 combine scene series) {
int lwir_level = CLT_PARAMETERS.lwir.getDebugLevel();
String slev = EyesisCorrections.stringLogLevel(lwir_level);
if (slev != null) {
System.out.println("Setting log level to "+slev);
loci.common.DebugTools.setRootLevel(slev);
}
long startTime = System.nanoTime(); long startTime = System.nanoTime();
// load needed sensor and kernels files // load needed sensor and kernels files
if (!prepareRigImages()) if (!prepareRigImages())
......
...@@ -185,7 +185,7 @@ public class Lwir16Reader { ...@@ -185,7 +185,7 @@ public class Lwir16Reader {
} catch (FormatException e) { } catch (FormatException e) {
LOGGER.error("readAllMultiple0:FormatException, priming"); LOGGER.error("readAllMultiple0:FormatException, priming");
} }
LOGGER.info("priming..."+(i+1)); LOGGER.debug("priming..."+(i+1));
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
...@@ -195,7 +195,7 @@ public class Lwir16Reader { ...@@ -195,7 +195,7 @@ public class Lwir16Reader {
} }
} }
for (int n = 0; n < num_frames; n++) { for (int n = 0; n < num_frames; n++) {
LOGGER.info("---- Acquiring frame set "+n); LOGGER.debug("---- Acquiring frame set "+n);
try { try {
// imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std); // imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std);
imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], scale, std); imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], scale, std);
...@@ -567,7 +567,7 @@ public class Lwir16Reader { ...@@ -567,7 +567,7 @@ public class Lwir16Reader {
FileSaver fs=new FileSaver(imp); FileSaver fs=new FileSaver(imp);
String path=set_path+Prefs.getFileSeparator()+fname; String path=set_path+Prefs.getFileSeparator()+fname;
IJ.showStatus("Saving "+path); IJ.showStatus("Saving "+path);
LOGGER.info("LWIR_ACQUIRE: 'Saving "+path ); LOGGER.debug("LWIR_ACQUIRE: 'Saving "+path );
fs.saveAsTiff(path); fs.saveAsTiff(path);
} }
} }
...@@ -1106,7 +1106,7 @@ public class Lwir16Reader { ...@@ -1106,7 +1106,7 @@ public class Lwir16Reader {
FileSaver fs=new FileSaver(imp); FileSaver fs=new FileSaver(imp);
String path=set_path+Prefs.getFileSeparator()+fname; String path=set_path+Prefs.getFileSeparator()+fname;
IJ.showStatus("Saving "+path); IJ.showStatus("Saving "+path);
LOGGER.info("LWIR_ACQUIRE: 'Saving "+path ); LOGGER.debug("LWIR_ACQUIRE: 'Saving "+path );
fs.saveAsTiff(path); fs.saveAsTiff(path);
} }
} }
...@@ -1144,7 +1144,7 @@ public class Lwir16Reader { ...@@ -1144,7 +1144,7 @@ public class Lwir16Reader {
if (imagejJp4TiffMulti == null) { if (imagejJp4TiffMulti == null) {
imagejJp4TiffMulti = new ImagejJp4TiffMulti(); imagejJp4TiffMulti = new ImagejJp4TiffMulti();
} }
LOGGER.info("---- Acquiring frame set "+dbgtxt); LOGGER.debug("---- Acquiring frame set "+dbgtxt);
try { try {
imagejJp4TiffMulti.getMultiImages(urls, imps, scale, std); imagejJp4TiffMulti.getMultiImages(urls, imps, scale, std);
} catch (IOException e) { } catch (IOException e) {
......
...@@ -158,7 +158,7 @@ public class LwirReader { ...@@ -158,7 +158,7 @@ public class LwirReader {
} catch (FormatException e) { } catch (FormatException e) {
LOGGER.error("readAllMultiple0:FormatException, priming"); LOGGER.error("readAllMultiple0:FormatException, priming");
} }
LOGGER.info("priming..."+(i+1)); LOGGER.debug("priming..."+(i+1));
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
...@@ -168,7 +168,7 @@ public class LwirReader { ...@@ -168,7 +168,7 @@ public class LwirReader {
} }
} }
for (int n = 0; n < num_frames; n++) { for (int n = 0; n < num_frames; n++) {
LOGGER.info("---- Acquiring frame set "+n); LOGGER.debug("---- Acquiring frame set "+n);
try { try {
// imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std); // imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std);
imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], scale, std); imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], scale, std);
...@@ -572,7 +572,7 @@ public class LwirReader { ...@@ -572,7 +572,7 @@ public class LwirReader {
FileSaver fs=new FileSaver(imp); FileSaver fs=new FileSaver(imp);
String path=set_path+Prefs.getFileSeparator()+fname; String path=set_path+Prefs.getFileSeparator()+fname;
IJ.showStatus("Saving "+path); IJ.showStatus("Saving "+path);
LOGGER.info("LWIR_ACQUIRE: 'Saving "+path ); LOGGER.debug("LWIR_ACQUIRE: 'Saving "+path );
fs.saveAsTiff(path); fs.saveAsTiff(path);
} }
} }
......
...@@ -109,24 +109,12 @@ public class ImagejJp4Tiff { ...@@ -109,24 +109,12 @@ public class ImagejJp4Tiff {
private static final String FIXCH5_LATEST = "2025-11-01 00:00:00.000"; // finally fixed private static final String FIXCH5_LATEST = "2025-11-01 00:00:00.000"; // finally fixed
private static final int FIXCH5_CHANNEL = 1; private static final int FIXCH5_CHANNEL = 1;
/*
public static boolean setLogger() {
if (LOGGER == null) {
LOGGER =
LoggerFactory.getLogger(ClassList.class);
return true;
} else {
return false;
}
}
*/
// -- Fields -- // -- Fields --
private ImageReader reader = null; private ImageReader reader = null;
private String content_fileName = "undefined"; // from Content-disposition private String content_fileName = "undefined"; // from Content-disposition
private URL url = null; // save here actual URL when reading file to memory private URL url = null; // save here actual URL when reading file to memory
IMetadata omeMeta = null; IMetadata omeMeta = null;
// codex 2026-01-25: reuse ServiceFactory/OMEXMLService to avoid repeated service init
private static ServiceFactory SERVICE_FACTORY = null; private static ServiceFactory SERVICE_FACTORY = null;
private static OMEXMLService OME_XML_SERVICE = null; private static OMEXMLService OME_XML_SERVICE = null;
...@@ -144,7 +132,9 @@ public class ImagejJp4Tiff { ...@@ -144,7 +132,9 @@ public class ImagejJp4Tiff {
// URL u = this.getClass().getResource("/"+SERVICES_PATH); // URL u = this.getClass().getResource("/"+SERVICES_PATH);
if (!BYPASS_SERVICES) { if (!BYPASS_SERVICES) {
OMEXMLService service = getOmexmlService(); OMEXMLService service = useOmexmlSingleton()
? getOmexmlService()
: createOmexmlService();
if (service != null) { if (service != null) {
try { try {
omeMeta = service.createOMEXMLMetadata(); omeMeta = service.createOMEXMLMetadata();
...@@ -181,6 +171,30 @@ public class ImagejJp4Tiff { ...@@ -181,6 +171,30 @@ public class ImagejJp4Tiff {
return OME_XML_SERVICE; return OME_XML_SERVICE;
} }
private static OMEXMLService createOmexmlService() {
ServiceFactory factory = null;
try {
factory = new ServiceFactory();
} catch (DependencyException e) {
e.printStackTrace();
return null;
}
try {
return factory.getInstance(OMEXMLService.class);
} catch (DependencyException e) {
e.printStackTrace();
return null;
}
}
private static boolean useOmexmlSingleton() {
String value = System.getProperty("elphel.ome.singleton");
if (value == null || value.isEmpty()) {
return false;
}
return Boolean.parseBoolean(value);
}
// -- API methods -- // -- API methods --
public ImagePlus readTiffJp4(String path) throws IOException, FormatException { public ImagePlus readTiffJp4(String path) throws IOException, FormatException {
...@@ -216,7 +230,7 @@ public class ImagejJp4Tiff { ...@@ -216,7 +230,7 @@ public class ImagejJp4Tiff {
} }
//https://stackoverflow.com/questions/39086500/read-http-response-header-and-body-from-one-http-request-in-java //https://stackoverflow.com/questions/39086500/read-http-response-header-and-body-from-one-http-request-in-java
if (url != null) { if (url != null) {
LOGGER.debug("Read "+ path_url +" to memory first"); LOGGER.info("Read "+ path_url +" to memory first");
URLConnection connection = url.openConnection(); URLConnection connection = url.openConnection();
// Wrong - waits forever // Wrong - waits forever
String content_disposition = connection.getHeaderField("Content-Disposition"); // reads file String content_disposition = connection.getHeaderField("Content-Disposition"); // reads file
...@@ -241,7 +255,7 @@ public class ImagejJp4Tiff { ...@@ -241,7 +255,7 @@ public class ImagejJp4Tiff {
// super.setId(content_fileName); // super.setId(content_fileName);
} else { // read file normally } else { // read file normally
content_fileName = path_url; content_fileName = path_url;
LOGGER.debug("read '"+path_url+"' file directly"); LOGGER.info("read '"+path_url+"' file directly");
} }
reader.setId(content_fileName); reader.setId(content_fileName);
byte [] bytes = null; byte [] bytes = null;
......
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