Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
1e93c781
Commit
1e93c781
authored
Jan 27, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolving slf4j issues
parent
aaf90b6f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
132 deletions
+95
-132
EyesisCorrections.java
.../java/com/elphel/imagej/correction/EyesisCorrections.java
+17
-4
Eyesis_Correction.java
.../java/com/elphel/imagej/correction/Eyesis_Correction.java
+41
-105
Lwir16Reader.java
src/main/java/com/elphel/imagej/lwir/Lwir16Reader.java
+5
-5
LwirReader.java
src/main/java/com/elphel/imagej/lwir/LwirReader.java
+3
-3
ImagejJp4Tiff.java
src/main/java/com/elphel/imagej/readers/ImagejJp4Tiff.java
+29
-15
No files found.
src/main/java/com/elphel/imagej/correction/EyesisCorrections.java
View file @
1e93c781
...
...
@@ -91,8 +91,9 @@ public class EyesisCorrections {
){
this
.
correctionsParameters
=
correctionsParameters
;
this
.
stopRequested
=
stopRequested
;
setDebug
(-
2
);
//
setDebug(-2);
}
/*
public void setDebug(int debugLevel){
this.debugLevel=debugLevel;
String LOG_LEVEL = "OFF";
...
...
@@ -114,9 +115,9 @@ public class EyesisCorrections {
loci.common.DebugTools.setRootLevel(LOG_LEVEL);
// }
System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL);
*/
}
*/
/*
public void setDebugOnce(int debugLevel){
this.debugLevel=debugLevel;
String LOG_LEVEL = "OFF";
...
...
@@ -135,7 +136,19 @@ public class EyesisCorrections {
System.out.println("EyesisCorrections.setDebug("+debugLevel+"), LOG_LEVEL_SET="+LOG_LEVEL_SET+" LOG_LEVEL="+LOG_LEVEL);
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
;}
...
...
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java
View file @
1e93c781
...
...
@@ -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
private
void
applyJulRootLevel
(
String
value
)
{
java
.
util
.
logging
.
Level
level
=
julLevel
(
value
);
...
...
@@ -1646,7 +1672,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
public
void
processFiles
()
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
String
configPath
=
null
;
if
(!
headless
&&
EYESIS_CORRECTIONS
.
correctionsParameters
.
saveSettings
)
{
configPath
=
EYESIS_CORRECTIONS
.
correctionsParameters
.
selectResultsDirectory
(
true
,
true
);
...
...
@@ -1734,17 +1759,20 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
default
:
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);
if (!LOG_LEVEL_SET) { // only first time true
loci.common.DebugTools.setRootLevel(LOG_LEVEL);
}
*/
System
.
out
.
println
(
"DEBUG_LEVEL = "
+
DEBUG_LEVEL
+
", CLT_PARAMETERS.lwir.getDebugLevel() = "
+
CLT_PARAMETERS
.
lwir
.
getDebugLevel
()
+
" LOG_LEVEL="
+
LOG_LEVEL
+
" LOG_LEVEL_SET="
+
LOG_LEVEL_SET
);
+
CLT_PARAMETERS
.
lwir
.
getDebugLevel
()
+
" LOG_LEVEL="
+
LOG_LEVEL
);
//
+ " 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)
// 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 {
}
else
if
(
label
.
equals
(
"Save"
)
||
label
.
equals
(
"Save Clean"
))
{
// If saved just after restore, QUAD_CLT==null and QUAD_CLT_AUX==null and are
// not saved
int
dbg_magic
=
4
;
System
.
out
.
println
(
"dbg_magic="
+
dbg_magic
);
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
(
dbg_magic
==
1
)
{
return
;
}
if
(
QUAD_CLT_AUX
==
null
)
{
if
(
EYESIS_CORRECTIONS_AUX
==
null
)
{
EYESIS_CORRECTIONS_AUX
=
new
EyesisCorrections
(
SYNC_COMMAND
.
stopRequested
,
CORRECTION_PARAMETERS
.
getAux
());
}
if
(
dbg_magic
==
2
)
{
return
;
}
QUAD_CLT_AUX
=
new
QuadCLT
(
QuadCLT
.
PREFIX_AUX
,
PROPERTIES
,
EYESIS_CORRECTIONS_AUX
,
CORRECTION_PARAMETERS
.
getAux
());
if
(
DEBUG_LEVEL
>
0
)
{
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"
))
{
PROPERTIES
=
new
Properties
();
}
if
(
dbg_magic
==
4
)
{
return
;
}
saveProperties
(
null
,
CORRECTION_PARAMETERS
.
resultsDirectory
,
...
...
@@ -4069,7 +4082,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"DCT process files"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
EYESIS_DCT
==
null
)
{
EYESIS_DCT
=
new
EyesisDCT
(
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
,
DCT_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -4661,7 +4673,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"DCT test 4"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
String
configPath
=
getSaveCongigPath
();
if
(
configPath
.
equals
(
"ABORT"
))
return
;
...
...
@@ -4926,7 +4937,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
return
;
}
else
if
(
label
.
equals
(
"CLT process files"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
QUAD_CLT
=
new
QuadCLT
(
QuadCLT
.
PREFIX
,
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -4975,7 +4985,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"CLT process sets"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
QUAD_CLT
=
new
QuadCLT
(
QuadCLT
.
PREFIX
,
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -5038,7 +5047,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
boolean
apply_corr
=
label
.
equals
(
"CLT apply fine corr"
);
boolean
infinity_corr
=
label
.
equals
(
"CLT infinity corr"
);
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
QUAD_CLT
=
new
QuadCLT
(
QuadCLT
.
PREFIX
,
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -5185,7 +5193,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
EYESIS_CORRECTIONS_AUX
=
new
EyesisCorrections
(
SYNC_COMMAND
.
stopRequested
,
CORRECTION_PARAMETERS
.
getAux
());
}
EYESIS_CORRECTIONS_AUX
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT_AUX
==
null
)
{
QUAD_CLT_AUX
=
new
QuadCLT
(
QuadCLT
.
PREFIX_AUX
,
PROPERTIES
,
EYESIS_CORRECTIONS_AUX
,
CORRECTION_PARAMETERS
.
getAux
());
...
...
@@ -5368,7 +5375,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"CLT disparity scan"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
QUAD_CLT
=
new
QuadCLT
(
QuadCLT
.
PREFIX
,
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -5451,7 +5457,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
boolean
dry_run
=
label
.
equals
(
"DRY RUN"
);
// init kernel/geometry only
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
clt3d
(
adjust_extrinsics
,
adjust_poly
,
dry_run
);
return
;
...
...
@@ -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_poly
=
label
.
equals
(
"AUX Poly corr"
);
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
clt3d_aux
(
adjust_extrinsics
,
adjust_poly
);
return
;
}
else
if
(
label
.
equals
(
"Main to AUX"
)
||
label
.
equals
(
"Main img AUX"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
mainToAux
(
label
.
equals
(
"Main img AUX"
));
return
;
//
}
else
if
(
label
.
equals
(
"CLT planes"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show"
);
return
;
...
...
@@ -5483,7 +5485,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"Periodic"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show"
);
return
;
...
...
@@ -5496,7 +5497,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"CLT ASSIGN"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show"
);
return
;
...
...
@@ -5518,7 +5518,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"CLT OUT 3D"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show (will add previous steps)"
);
return
;
...
...
@@ -5542,7 +5541,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
else
if
(
label
.
equals
(
"CLT batch process"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
CLT_PARAMETERS
.
batch_run
=
true
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
)
{
QUAD_CLT
=
new
QuadCLT
(
QuadCLT
.
PREFIX
,
PROPERTIES
,
EYESIS_CORRECTIONS
,
CORRECTION_PARAMETERS
);
if
(
DEBUG_LEVEL
>
0
)
{
...
...
@@ -5620,39 +5618,33 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"CLT 2*4 images"
))
{
// never used
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
getPairImages
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Rig8 images"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
getPairImages2
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"GPU simulate"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
generateGPUDebugFiles
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"GPU RUN"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
getPairImages2Gpu
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"ShowGPU"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
showImageFromGPU
();
return
;
//
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"RIG extrinsics"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
infinityRig
();
return
;
/* ======================================================================== */
...
...
@@ -5710,7 +5702,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"LIST extrinsics"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
EYESIS_CORRECTIONS_AUX
==
null
)
{
EYESIS_CORRECTIONS_AUX
=
new
EyesisCorrections
(
SYNC_COMMAND
.
stopRequested
,
CORRECTION_PARAMETERS
.
getAux
());
...
...
@@ -5720,72 +5711,61 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"ML recalc"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
mlRecalc
();
return
;
//
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"DSI histogram"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
dsiHistogram
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Reset GT"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
resetGroundTruth
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Ground truth"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
groundTruth
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"RIG DSI"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
rigDSI
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Show biscan"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
showBiScan
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Poles GT"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
processPoles
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"CLT planes"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
rigPlanes
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"ML export"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
exportMLData
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"JP4 copy"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
copyJP4src
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Rig batch"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
batchRig
();
return
;
...
...
@@ -5793,38 +5773,19 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"LWIR batch"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
batchLwir
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Test"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
testInterScene
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Build Series"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
/// EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
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
(
true
,
0
);
// int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
...
...
@@ -5832,7 +5793,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"CUAS Combine"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
buildSeries
(
true
,
...
...
@@ -5842,7 +5802,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"CUAS Video"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
buildSeries
(
true
,
...
...
@@ -5851,49 +5810,42 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter Test"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
testInterScene
(
true
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Pairs"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
interPairsLMA
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter Pairs"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
interPairsLMA
(
true
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Series"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
interSeriesLMA
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter Series"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
interSeriesLMA
(
true
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Accumulate"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneAccumulate
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter Accumulate"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneAccumulate
(
true
);
return
;
...
...
@@ -5901,28 +5853,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Noise"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoise
(
false
,
false
,
false
);
// boolean bayer_artifacts_debug);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Noise Aux"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoise
(
true
,
false
,
false
);
// boolean bayer_artifacts_debug);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Intra ML"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
inter_intra_export
(
true
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Batch Noise Aux"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoise
(
true
,
true
,
false
);
// boolean bayer_artifacts_debug);
return
;
...
...
@@ -5930,7 +5878,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter Debug Noise"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoise
(
false
,
false
,
true
);
// boolean bayer_artifacts_debug);
return
;
...
...
@@ -5938,7 +5885,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Noise Stats"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoiseStats
(
false
);
return
;
...
...
@@ -5946,7 +5892,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Noise Stats Aux"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
intersceneNoiseStats
(
true
);
return
;
...
...
@@ -5954,14 +5899,12 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Colorize Depth"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
coloriseDepthMap
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Test 1D"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
test1d
();
return
;
...
...
@@ -5969,28 +5912,24 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Inter LMA"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
testInterLMA
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter LMA"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
testInterLMA
(
true
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Main LY series"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
adjustLYSeries
(
false
);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux LY series"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
adjustLYSeries
(
true
);
return
;
...
...
@@ -6164,7 +6103,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
CALIBRATION_ILLUSTRATION
);
}
else
if
(
label
.
equals
(
"Super batch"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
String
[]
configs
=
loadMultiProperties
(
CORRECTION_PARAMETERS
.
resultsDirectory
,
// String directory,
...
...
@@ -6265,16 +6203,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
return
;
}
else
if
(
label
.
equals
(
"Build World"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
buildLWIRWorld
(
true
);
return
;
}
else
if
(
label
.
equals
(
"Test IMX5"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
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"
;
if
((
imx_logs
==
null
)
||
imx_logs
.
equals
(
""
))
{
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 {
// End of buttons code
}
else
if
(
label
.
equals
(
"Show mice"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
ImagePlus
imp_src
=
WindowManager
.
getCurrentImage
();
ImagePlus
imp_mice
=
subtractAverage
(
imp_src
);
imp_mice
.
show
();
}
else
if
(
label
.
equals
(
"Set pair"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
ComboMatch
.
openTestPair
();
}
else
if
(
label
.
equals
(
"Warp pair"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
ComboMatch
.
testPair
();
}
else
if
(
label
.
equals
(
"Read Tiff"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
ImagePlus
imp_sel
=
WindowManager
.
getCurrentImage
();
if
(
imp_sel
==
null
)
{
IJ
.
showMessage
(
"Error"
,
"No images selected"
);
...
...
@@ -6364,7 +6295,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
// ComboMatch.testReadTiff();
}
else
if
(
label
.
equals
(
"Ortho"
)
||
label
.
equals
(
"Ortho Pairs"
)
||
label
.
equals
(
"Extract Objects"
)
||
label
.
equals
(
"Manual pair"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
GPU_TILE_PROCESSOR
==
null
)
{
try
{
GPU_TILE_PROCESSOR
=
new
GPUTileProcessor
(
CORRECTION_PARAMETERS
.
tile_processor_gpu
);
...
...
@@ -6728,7 +6658,6 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
EYESIS_CORRECTIONS_AUX
=
new
EyesisCorrections
(
SYNC_COMMAND
.
stopRequested
,
CORRECTION_PARAMETERS
.
getAux
());
}
EYESIS_CORRECTIONS_AUX
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT_AUX
==
null
)
{
QUAD_CLT_AUX
=
new
QuadCLT
(
QuadCLT
.
PREFIX_AUX
,
PROPERTIES
,
EYESIS_CORRECTIONS_AUX
,
CORRECTION_PARAMETERS
.
getAux
());
...
...
@@ -7994,6 +7923,13 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
public
boolean
buildSeries
(
boolean
use_aux
,
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
();
// load needed sensor and kernels files
if
(!
prepareRigImages
())
...
...
src/main/java/com/elphel/imagej/lwir/Lwir16Reader.java
View file @
1e93c781
...
...
@@ -185,7 +185,7 @@ public class Lwir16Reader {
}
catch
(
FormatException
e
)
{
LOGGER
.
error
(
"readAllMultiple0:FormatException, priming"
);
}
LOGGER
.
info
(
"priming..."
+(
i
+
1
));
LOGGER
.
debug
(
"priming..."
+(
i
+
1
));
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
...
...
@@ -195,7 +195,7 @@ public class Lwir16Reader {
}
}
for
(
int
n
=
0
;
n
<
num_frames
;
n
++)
{
LOGGER
.
info
(
"---- Acquiring frame set "
+
n
);
LOGGER
.
debug
(
"---- Acquiring frame set "
+
n
);
try
{
// imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std);
imagejJp4TiffMulti
.
getMultiImages
(
(
n
==
0
)?
urls0:
urls1
,
imps
[
n
],
scale
,
std
);
...
...
@@ -567,7 +567,7 @@ public class Lwir16Reader {
FileSaver
fs
=
new
FileSaver
(
imp
);
String
path
=
set_path
+
Prefs
.
getFileSeparator
()+
fname
;
IJ
.
showStatus
(
"Saving "
+
path
);
LOGGER
.
info
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
LOGGER
.
debug
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
fs
.
saveAsTiff
(
path
);
}
}
...
...
@@ -1106,7 +1106,7 @@ public class Lwir16Reader {
FileSaver
fs
=
new
FileSaver
(
imp
);
String
path
=
set_path
+
Prefs
.
getFileSeparator
()+
fname
;
IJ
.
showStatus
(
"Saving "
+
path
);
LOGGER
.
info
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
LOGGER
.
debug
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
fs
.
saveAsTiff
(
path
);
}
}
...
...
@@ -1144,7 +1144,7 @@ public class Lwir16Reader {
if
(
imagejJp4TiffMulti
==
null
)
{
imagejJp4TiffMulti
=
new
ImagejJp4TiffMulti
();
}
LOGGER
.
info
(
"---- Acquiring frame set "
+
dbgtxt
);
LOGGER
.
debug
(
"---- Acquiring frame set "
+
dbgtxt
);
try
{
imagejJp4TiffMulti
.
getMultiImages
(
urls
,
imps
,
scale
,
std
);
}
catch
(
IOException
e
)
{
...
...
src/main/java/com/elphel/imagej/lwir/LwirReader.java
View file @
1e93c781
...
...
@@ -158,7 +158,7 @@ public class LwirReader {
}
catch
(
FormatException
e
)
{
LOGGER
.
error
(
"readAllMultiple0:FormatException, priming"
);
}
LOGGER
.
info
(
"priming..."
+(
i
+
1
));
LOGGER
.
debug
(
"priming..."
+(
i
+
1
));
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
...
...
@@ -168,7 +168,7 @@ public class LwirReader {
}
}
for
(
int
n
=
0
;
n
<
num_frames
;
n
++)
{
LOGGER
.
info
(
"---- Acquiring frame set "
+
n
);
LOGGER
.
debug
(
"---- Acquiring frame set "
+
n
);
try
{
// imagejJp4TiffMulti.getMultiImages( (n==0)? urls0:urls1, imps[n], telemetry, scale, std);
imagejJp4TiffMulti
.
getMultiImages
(
(
n
==
0
)?
urls0:
urls1
,
imps
[
n
],
scale
,
std
);
...
...
@@ -572,7 +572,7 @@ public class LwirReader {
FileSaver
fs
=
new
FileSaver
(
imp
);
String
path
=
set_path
+
Prefs
.
getFileSeparator
()+
fname
;
IJ
.
showStatus
(
"Saving "
+
path
);
LOGGER
.
info
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
LOGGER
.
debug
(
"LWIR_ACQUIRE: 'Saving "
+
path
);
fs
.
saveAsTiff
(
path
);
}
}
...
...
src/main/java/com/elphel/imagej/readers/ImagejJp4Tiff.java
View file @
1e93c781
...
...
@@ -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
int
FIXCH5_CHANNEL
=
1
;
/*
public static boolean setLogger() {
if (LOGGER == null) {
LOGGER =
LoggerFactory.getLogger(ClassList.class);
return true;
} else {
return false;
}
}
*/
// -- Fields --
private
ImageReader
reader
=
null
;
private
String
content_fileName
=
"undefined"
;
// from Content-disposition
private
URL
url
=
null
;
// save here actual URL when reading file to memory
IMetadata
omeMeta
=
null
;
// codex 2026-01-25: reuse ServiceFactory/OMEXMLService to avoid repeated service init
private
static
ServiceFactory
SERVICE_FACTORY
=
null
;
private
static
OMEXMLService
OME_XML_SERVICE
=
null
;
...
...
@@ -144,7 +132,9 @@ public class ImagejJp4Tiff {
// URL u = this.getClass().getResource("/"+SERVICES_PATH);
if
(!
BYPASS_SERVICES
)
{
OMEXMLService
service
=
getOmexmlService
();
OMEXMLService
service
=
useOmexmlSingleton
()
?
getOmexmlService
()
:
createOmexmlService
();
if
(
service
!=
null
)
{
try
{
omeMeta
=
service
.
createOMEXMLMetadata
();
...
...
@@ -181,6 +171,30 @@ public class ImagejJp4Tiff {
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 --
public
ImagePlus
readTiffJp4
(
String
path
)
throws
IOException
,
FormatException
{
...
...
@@ -216,7 +230,7 @@ public class ImagejJp4Tiff {
}
//https://stackoverflow.com/questions/39086500/read-http-response-header-and-body-from-one-http-request-in-java
if
(
url
!=
null
)
{
LOGGER
.
debug
(
"Read "
+
path_url
+
" to memory first"
);
LOGGER
.
info
(
"Read "
+
path_url
+
" to memory first"
);
URLConnection
connection
=
url
.
openConnection
();
// Wrong - waits forever
String
content_disposition
=
connection
.
getHeaderField
(
"Content-Disposition"
);
// reads file
...
...
@@ -241,7 +255,7 @@ public class ImagejJp4Tiff {
// super.setId(content_fileName);
}
else
{
// read file normally
content_fileName
=
path_url
;
LOGGER
.
debug
(
"read '"
+
path_url
+
"' file directly"
);
LOGGER
.
info
(
"read '"
+
path_url
+
"' file directly"
);
}
reader
.
setId
(
content_fileName
);
byte
[]
bytes
=
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment