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
155415d8
Commit
155415d8
authored
Nov 06, 2021
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generating more data for plots in Libreoffice Calc
parent
e6d6f963
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
979 additions
and
219 deletions
+979
-219
InterIntraLMA.java
...n/java/com/elphel/imagej/tileprocessor/InterIntraLMA.java
+383
-27
QuadCLT.java
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
+3
-15
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+42
-71
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+551
-106
No files found.
src/main/java/com/elphel/imagej/tileprocessor/InterIntraLMA.java
View file @
155415d8
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
View file @
155415d8
...
@@ -2010,11 +2010,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2010,11 +2010,7 @@ public class QuadCLT extends QuadCLTCPU {
EyesisCorrectionParameters
.
RGBParameters
rgbParameters
,
EyesisCorrectionParameters
.
RGBParameters
rgbParameters
,
final
int
threadsMax
,
// maximal number of threads to launch
final
int
threadsMax
,
// maximal number of threads to launch
final
int
debugLevel
){
final
int
debugLevel
){
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
file_name
=
image_name
+
suffix
;
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
if
((
getGPU
()
!=
null
)
&&
(
getGPU
().
getQuadCLT
()
!=
this
))
{
if
((
getGPU
()
!=
null
)
&&
(
getGPU
().
getQuadCLT
()
!=
this
))
{
...
@@ -2224,11 +2220,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2224,11 +2220,7 @@ public class QuadCLT extends QuadCLTCPU {
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
// Save as individual JPEG images in the model directory
// Save as individual JPEG images in the model directory
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
String
x3d_path
=
getX3dDirectory
();
image_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
imps_RGB
[
sub_img
],
...
@@ -2759,11 +2751,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2759,11 +2751,7 @@ public class QuadCLT extends QuadCLTCPU {
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
// Save as individual JPEG images in the model directory
// Save as individual JPEG images in the model directory
String
x3d_path
=
quadCLT_main
.
correctionsParameters
.
selectX3dDirectory
(
String
x3d_path
=
quadCLT_main
.
getX3dDirectory
();
name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
quadCLT_main
.
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
imps_RGB
[
sub_img
],
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
155415d8
...
@@ -329,6 +329,26 @@ public class QuadCLTCPU {
...
@@ -329,6 +329,26 @@ public class QuadCLTCPU {
return
image_name
;
return
image_name
;
}
}
public
String
getX3dDirectory
()
{
// replace direct calculations
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
return
x3d_path
;
}
// maybe will not be needed? TODO: Check
public
String
getX3dDirectory
(
String
name
)
{
// replace direct calculations
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
return
x3d_path
;
}
public
int
restoreDSI
(
public
int
restoreDSI
(
String
suffix
,
String
suffix
,
boolean
silent
)
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
boolean
silent
)
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
...
@@ -344,11 +364,7 @@ public class QuadCLTCPU {
...
@@ -344,11 +364,7 @@ public class QuadCLTCPU {
String
suffix
,
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
String
suffix
,
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
double
[][]
dsi
,
double
[][]
dsi
,
boolean
silent
)
{
boolean
silent
)
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
image_name
+
suffix
+
".tiff"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
image_name
+
suffix
+
".tiff"
;
ImagePlus
imp
=
null
;
ImagePlus
imp
=
null
;
try
{
try
{
...
@@ -404,12 +420,8 @@ public class QuadCLTCPU {
...
@@ -404,12 +420,8 @@ public class QuadCLTCPU {
}
}
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
}
}
Properties
inter_properties
=
new
Properties
();
Properties
inter_properties
=
new
Properties
();
String
prefix
=
is_aux
?
PREFIX_AUX:
PREFIX
;
String
prefix
=
is_aux
?
PREFIX_AUX:
PREFIX
;
...
@@ -465,12 +477,8 @@ public class QuadCLTCPU {
...
@@ -465,12 +477,8 @@ public class QuadCLTCPU {
}
}
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
}
}
properties
=
loadProperties
(
properties
=
loadProperties
(
path
,
// String path,
path
,
// String path,
...
@@ -827,11 +835,7 @@ public class QuadCLTCPU {
...
@@ -827,11 +835,7 @@ public class QuadCLTCPU {
final
int
num_cams
=
this
.
image_data
.
length
;
final
int
num_cams
=
this
.
image_data
.
length
;
final
int
num_cols
=
image_data
[
0
].
length
;
final
int
num_cols
=
image_data
[
0
].
length
;
final
int
[]
image_wh
=
geometryCorrection
.
getSensorWH
();
final
int
[]
image_wh
=
geometryCorrection
.
getSensorWH
();
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
noise_suffix
=
suffix
+
sigma
;
String
noise_suffix
=
suffix
+
sigma
;
String
file_name
=
image_name
+
noise_suffix
;
String
file_name
=
image_name
+
noise_suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
...
@@ -962,11 +966,7 @@ public class QuadCLTCPU {
...
@@ -962,11 +966,7 @@ public class QuadCLTCPU {
int
width
,
int
width
,
int
height
)
int
height
)
{
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
file_name
=
image_name
+
suffix
;
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
ImageStack
imageStack
=
(
new
ShowDoubleFloatArrays
()).
makeStack
(
data
,
width
,
height
,
labels
);
ImageStack
imageStack
=
(
new
ShowDoubleFloatArrays
()).
makeStack
(
data
,
width
,
height
,
labels
);
...
@@ -984,11 +984,7 @@ public class QuadCLTCPU {
...
@@ -984,11 +984,7 @@ public class QuadCLTCPU {
)
)
{
{
// final int [] image_wh = geometryCorrection.getSensorWH();
// final int [] image_wh = geometryCorrection.getSensorWH();
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
file_name
=
image_name
+
suffix
;
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
ImagePlus
imp
=
null
;
ImagePlus
imp
=
null
;
...
@@ -1030,19 +1026,15 @@ public class QuadCLTCPU {
...
@@ -1030,19 +1026,15 @@ public class QuadCLTCPU {
double
[][]
dsi
double
[][]
dsi
)
)
{
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
String
title
=
image_name
+
TwoQuadCLT
.
DSI_COMBO_SUFFIX
;
correctionsParameters
.
x3dModelVersion
,
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
true
,
// smart,
eyesisCorrections
.
saveAndShow
(
true
);
//newAllowed, // save
imp
,
// ImagePlus imp,
String
title
=
image_name
+
TwoQuadCLT
.
DSI_COMBO_SUFFIX
;
x3d_path
,
// String path,
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
false
,
// boolean png,
eyesisCorrections
.
saveAndShow
(
false
,
// boolean show,
imp
,
// ImagePlus imp,
0
);
// int jpegQuality)
x3d_path
,
// String path,
false
,
// boolean png,
false
,
// boolean show,
0
);
// int jpegQuality)
}
}
public
void
showDSI
(){
showDSI
(
this
.
dsi
);}
public
void
showDSI
(){
showDSI
(
this
.
dsi
);}
...
@@ -1056,11 +1048,7 @@ public class QuadCLTCPU {
...
@@ -1056,11 +1048,7 @@ public class QuadCLTCPU {
public
void
saveDSIMain
(
public
void
saveDSIMain
(
double
[][]
dsi
)
// DSI_SLICES.length
double
[][]
dsi
)
// DSI_SLICES.length
{
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
title
=
image_name
+
"-DSI_MAIN"
;
String
title
=
image_name
+
"-DSI_MAIN"
;
String
[]
titles
=
{
TwoQuadCLT
.
DSI_SLICES
[
TwoQuadCLT
.
DSI_DISPARITY_MAIN
],
TwoQuadCLT
.
DSI_SLICES
[
TwoQuadCLT
.
DSI_STRENGTH_MAIN
]};
String
[]
titles
=
{
TwoQuadCLT
.
DSI_SLICES
[
TwoQuadCLT
.
DSI_DISPARITY_MAIN
],
TwoQuadCLT
.
DSI_SLICES
[
TwoQuadCLT
.
DSI_STRENGTH_MAIN
]};
double
[][]
dsi_main
=
{
dsi
[
TwoQuadCLT
.
DSI_DISPARITY_MAIN
],
dsi
[
TwoQuadCLT
.
DSI_STRENGTH_MAIN
]};
double
[][]
dsi_main
=
{
dsi
[
TwoQuadCLT
.
DSI_DISPARITY_MAIN
],
dsi
[
TwoQuadCLT
.
DSI_STRENGTH_MAIN
]};
...
@@ -1078,11 +1066,7 @@ public class QuadCLTCPU {
...
@@ -1078,11 +1066,7 @@ public class QuadCLTCPU {
String
suffix
,
// "-DSI_MAIN"
String
suffix
,
// "-DSI_MAIN"
double
[][]
dsi
)
// DSI_SLICES.length
double
[][]
dsi
)
// DSI_SLICES.length
{
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
title
=
image_name
+
suffix
;
// "-DSI_MAIN";
String
title
=
image_name
+
suffix
;
// "-DSI_MAIN";
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
eyesisCorrections
.
saveAndShow
(
eyesisCorrections
.
saveAndShow
(
...
@@ -1101,11 +1085,7 @@ public class QuadCLTCPU {
...
@@ -1101,11 +1085,7 @@ public class QuadCLTCPU {
QuadCLT
quadCLT_aux
,
QuadCLT
quadCLT_aux
,
double
[][]
dsi_aux_from_main
)
double
[][]
dsi_aux_from_main
)
{
{
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
title
=
quadCLT_aux
.
image_name
+
"-DSI_GT-AUX"
;
String
title
=
quadCLT_aux
.
image_name
+
"-DSI_GT-AUX"
;
// String [] titles = {DSI_SLICES[DSI_DISPARITY_MAIN], DSI_SLICES[DSI_STRENGTH_MAIN]};
// String [] titles = {DSI_SLICES[DSI_DISPARITY_MAIN], DSI_SLICES[DSI_STRENGTH_MAIN]};
// double [][] dsi_main = {dsi[DSI_DISPARITY_MAIN], dsi[DSI_STRENGTH_MAIN]};
// double [][] dsi_main = {dsi[DSI_DISPARITY_MAIN], dsi[DSI_STRENGTH_MAIN]};
...
@@ -5955,11 +5935,7 @@ public class QuadCLTCPU {
...
@@ -5955,11 +5935,7 @@ public class QuadCLTCPU {
}
}
if
(
clt_parameters
.
gen_4_img
)
{
if
(
clt_parameters
.
gen_4_img
)
{
// Save as individual JPEG images in the model directory
// Save as individual JPEG images in the model directory
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
String
x3d_path
=
getX3dDirectory
();
image_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
imps_RGB
[
sub_img
],
...
@@ -11047,12 +11023,7 @@ public class QuadCLTCPU {
...
@@ -11047,12 +11023,7 @@ public class QuadCLTCPU {
tp
.
clt_3d_passes
.
get
(
next_pass
-
1
),
// CLTPass3d scan,
tp
.
clt_3d_passes
.
get
(
next_pass
-
1
),
// CLTPass3d scan,
"after_pass3-"
+(
next_pass
-
1
));
//String title)
"after_pass3-"
+(
next_pass
-
1
));
//String title)
}
}
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
String
x3d_path
=
getX3dDirectory
();
correctionsParameters
.
getModelName
(
this
.
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
// create x3d file
// create x3d file
if
(
clt_parameters
.
output_x3d
)
{
if
(
clt_parameters
.
output_x3d
)
{
x3dOutput
=
new
X3dOutput
(
x3dOutput
=
new
X3dOutput
(
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
155415d8
This diff is collapsed.
Click to expand it.
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