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
a0b7dae3
Commit
a0b7dae3
authored
May 22, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched to bioformats 6.1.0 jar (minimal needed), set logging
parent
a17be71e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
35 deletions
+54
-35
pom.xml
pom.xml
+28
-26
Eyesis_Correction.java
.../java/com/elphel/imagej/correction/Eyesis_Correction.java
+16
-4
LwirReader.java
src/main/java/com/elphel/imagej/lwir/LwirReader.java
+1
-1
LwirReaderParameters.java
...ain/java/com/elphel/imagej/lwir/LwirReaderParameters.java
+8
-1
ImagejJp4Tiff.java
src/main/java/com/elphel/imagej/readers/ImagejJp4Tiff.java
+1
-3
No files found.
pom.xml
View file @
a0b7dae3
...
...
@@ -12,9 +12,11 @@
<relativePath/>
</parent>
<!--
<properties>
<imagej.app.directory>/home/foxel/Desktop/Fiji.app</imagej.app.directory>
</properties>
-->
<groupId>
com.elphel
</groupId>
<artifactId>
imagej-elphel
</artifactId>
...
...
@@ -88,8 +90,7 @@
<dependency>
<groupId>
ome
</groupId>
<artifactId>
loci_tools
</artifactId>
<version>
6.1.0-SNAPSHOT
</version>
<type>
java-source
</type>
<version>
6.1.0
</version>
</dependency>
<dependency>
<groupId>
com.drewnoakes
</groupId>
...
...
@@ -97,6 +98,7 @@
<version>
2.11.0
</version>
<type>
java-source
</type>
</dependency>
</dependencies>
<build>
...
...
@@ -207,7 +209,7 @@
<format>
Build {0,date,yyyy-MM-dd} {0,time,HH:MM:SS} on host {1}
</format>
<items>
<item>
timestamp
</item>
<item>
foxel-MRHM7AP
</item
>
<!-- <item>foxel-MRHM7AP</item> --
>
</items>
</configuration>
</plugin>
...
...
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java
View file @
a0b7dae3
...
...
@@ -897,8 +897,22 @@ private Panel panel1,
if
(
DEBUG_LEVEL
>
0
)
System
.
out
.
println
(
"--- Free memory="
+
runtime
.
freeMemory
()+
" (of "
+
runtime
.
totalMemory
()+
")"
);
CLT_PARAMETERS
.
batch_run
=
false
;
if
(
label
==
null
)
return
;
System
.
out
.
println
(
"DEBUG_LEVEL = "
+
DEBUG_LEVEL
+
", MASTER_DEBUG_LEVEL = "
+
MASTER_DEBUG_LEVEL
);
loci
.
common
.
DebugTools
.
enableLogging
((
MASTER_DEBUG_LEVEL
>
1
)?
"DEBUG"
:((
MASTER_DEBUG_LEVEL
>
0
)?
"INFO"
:
"ERROR"
));
// INFO"); // ERROR");
String
LOG_LEVEL
;
switch
(
MASTER_DEBUG_LEVEL
)
{
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"
;
}
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
+
", MASTER_DEBUG_LEVEL = "
+
MASTER_DEBUG_LEVEL
+
" LOG_LEVEL="
+
LOG_LEVEL
+
"LOG_LEVEL_SET="
+
LOG_LEVEL_SET
);
/* ======================================================================== */
if
(
label
.
equals
(
"Configure spilt"
))
{
...
...
@@ -4831,7 +4845,6 @@ private Panel panel1,
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"LWIR_TEST"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
// loci.common.DebugTools.enableLogging((DEBUG_LEVEL > 1)?"DEBUG":((DEBUG_LEVEL > 0)?"INFO":"ERROR")); // INFO"); // ERROR");
// public static LwirReader LWIR_READER = null;
if
(
LWIR_READER
==
null
)
{
LWIR_READER
=
new
LwirReader
(
CLT_PARAMETERS
.
lwir
);
...
...
@@ -4856,7 +4869,6 @@ private Panel panel1,
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"LWIR_ACQUIRE"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
// loci.common.DebugTools.enableLogging((DEBUG_LEVEL > 1)?"DEBUG":((DEBUG_LEVEL > 0)?"INFO":"ERROR")); // INFO"); // ERROR");
// public static LwirReader LWIR_READER = null;
if
(
LWIR_READER
==
null
)
{
LWIR_READER
=
new
LwirReader
(
CLT_PARAMETERS
.
lwir
);
...
...
src/main/java/com/elphel/imagej/lwir/LwirReader.java
View file @
a0b7dae3
...
...
@@ -318,6 +318,7 @@ public class LwirReader {
}
public
boolean
calibrate
(
LwirReaderParameters
lrp
)
{
// FFC takes 15 frames that are not output (so no need to check operation is over)
if
(
lrp
.
lwir_channels
.
length
==
0
)
{
LOGGER
.
error
(
"calibrate(): No LWIR channels are configured"
);
return
false
;
...
...
@@ -328,7 +329,6 @@ public class LwirReader {
channels
|=
1
<<
c
;
}
String
hex_chan
=
String
.
format
(
"%x"
,
channels
);
System
.
out
.
println
(
"Channels = "
+
channels
+
" (0x"
+
hex_chan
);
String
url
=
"http://"
+
lrp
.
lwir_ip
+
"/parsedit.php?immediate&sensor_port="
+
chn
+
"&SENSOR_REGS67=0!"
+
hex_chan
;
...
...
src/main/java/com/elphel/imagej/lwir/LwirReaderParameters.java
View file @
a0b7dae3
...
...
@@ -33,12 +33,12 @@ import com.elphel.imagej.common.GenericJTabbedDialog;
public
class
LwirReaderParameters
{
private
boolean
parameters_updated
=
false
;
protected
int
avg_number
=
4
;
// number of measurements to average
protected
boolean
lwir_ffc
=
true
;
protected
boolean
avg_all
=
true
;
protected
String
lwir_ip
=
"192.168.0.36"
;
protected
String
vnir_ip
=
"192.168.0.38"
;
protected
int
[]
lwir_channels
=
{
0
,
1
,
2
,
3
};
protected
int
[]
vnir_channels
=
{
0
,
1
,
2
,
3
};
protected
boolean
lwir_ffc
=
true
;
protected
boolean
lwir_telemetry
=
true
;
protected
double
vnir_quality
=
98.0
;
protected
boolean
vnir_scale
=
false
;
// restore sensor pixel values, undo camera white balancing
...
...
@@ -74,6 +74,7 @@ public class LwirReaderParameters {
// --- interface methods
public
void
setProperties
(
String
prefix
,
Properties
properties
){
properties
.
setProperty
(
prefix
+
"avg_number"
,
this
.
avg_number
+
""
);
properties
.
setProperty
(
prefix
+
"lwir_ffc"
,
this
.
lwir_ffc
+
""
);
properties
.
setProperty
(
prefix
+
"avg_all"
,
this
.
avg_all
+
""
);
properties
.
setProperty
(
prefix
+
"lwir_ip"
,
this
.
lwir_ip
+
""
);
properties
.
setProperty
(
prefix
+
"vnir_ip"
,
this
.
vnir_ip
+
""
);
...
...
@@ -99,6 +100,7 @@ public class LwirReaderParameters {
public
void
getProperties
(
String
prefix
,
Properties
properties
){
if
(
properties
.
getProperty
(
prefix
+
"avg_number"
)!=
null
)
this
.
avg_number
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"avg_number"
));
if
(
properties
.
getProperty
(
prefix
+
"lwir_ffc"
)!=
null
)
this
.
lwir_ffc
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"lwir_ffc"
));
if
(
properties
.
getProperty
(
prefix
+
"avg_all"
)!=
null
)
this
.
avg_all
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"avg_all"
));
if
(
properties
.
getProperty
(
prefix
+
"lwir_ip"
)!=
null
)
this
.
lwir_ip
=
properties
.
getProperty
(
prefix
+
"lwir_ip"
);
if
(
properties
.
getProperty
(
prefix
+
"vnir_ip"
)!=
null
)
this
.
vnir_ip
=
properties
.
getProperty
(
prefix
+
"vnir_ip"
);
...
...
@@ -126,6 +128,7 @@ public class LwirReaderParameters {
public
LwirReaderParameters
clone
()
{
// throws CloneNotSupportedException {
LwirReaderParameters
lrp
=
new
LwirReaderParameters
();
lrp
.
avg_number
=
this
.
avg_number
;
lrp
.
lwir_ffc
=
this
.
lwir_ffc
;
lrp
.
avg_all
=
this
.
avg_all
;
lrp
.
lwir_ip
=
this
.
lwir_ip
;
lrp
.
vnir_ip
=
this
.
vnir_ip
;
...
...
@@ -160,6 +163,7 @@ public class LwirReaderParameters {
}
LwirReaderParameters
lrp
=
(
LwirReaderParameters
)
o
;
return
(
lrp
.
avg_number
==
this
.
avg_number
)
&&
(
lrp
.
lwir_ffc
==
this
.
lwir_ffc
)
&&
(
lrp
.
avg_all
==
this
.
avg_all
)
&&
(
lrp
.
lwir_ip
.
equals
(
this
.
lwir_ip
))
&&
(
lrp
.
vnir_ip
.
equals
(
this
.
vnir_ip
))
&&
...
...
@@ -188,6 +192,7 @@ public class LwirReaderParameters {
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
(
new
Integer
(
avg_number
)).
hashCode
();
result
=
prime
*
result
+
(
lwir_ffc
?
1
:
0
);
result
=
prime
*
result
+
(
avg_all
?
1
:
0
);
result
=
prime
*
result
+
lwir_ip
.
hashCode
();
result
=
prime
*
result
+
vnir_ip
.
hashCode
();
...
...
@@ -215,6 +220,7 @@ public class LwirReaderParameters {
public
void
dialogQuestions
(
GenericJTabbedDialog
gd
)
{
gd
.
addNumericField
(
"Number to average"
,
this
.
avg_number
,
0
,
3
,
""
,
"Number of acquired consecutive images to average"
);
gd
.
addCheckbox
(
"Run FFC"
,
this
.
lwir_ffc
,
"Perform calibration before each measurements to average (takes ~1.6 sec, 15 frames)"
);
gd
.
addCheckbox
(
"Average all"
,
this
.
avg_all
,
"Average all simultaneously acquired images (unchecked - only requested number to average)"
);
gd
.
addStringField
(
"LWIR IP"
,
this
.
lwir_ip
,
20
,
"LWIR camera IP address"
);
gd
.
addStringField
(
"VNIR IP"
,
this
.
vnir_ip
,
20
,
"Visible range high resolution camera IP address"
);
...
...
@@ -240,6 +246,7 @@ public class LwirReaderParameters {
public
void
dialogAnswers
(
GenericJTabbedDialog
gd
)
{
this
.
avg_number
=
(
int
)
gd
.
getNextNumber
();
this
.
lwir_ffc
=
gd
.
getNextBoolean
();
this
.
avg_all
=
gd
.
getNextBoolean
();
this
.
lwir_ip
=
gd
.
getNextString
();
this
.
vnir_ip
=
gd
.
getNextString
();
...
...
src/main/java/com/elphel/imagej/readers/ImagejJp4Tiff.java
View file @
a0b7dae3
...
...
@@ -91,8 +91,6 @@ public class ImagejJp4Tiff {
//URL u = this.getClass().getResource(SERVICES_PATH);
// URL u = this.getClass().getResource("/"+SERVICES_PATH);
// loci.common.DebugTools.enableLogging("ERROR");
if
(!
BYPASS_SERVICES
)
{
ServiceFactory
factory
=
null
;
...
...
@@ -153,7 +151,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
.
error
(
"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
...
...
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