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 {
EyesisCorrectionParameters
.
RGBParameters
rgbParameters
,
final
int
threadsMax
,
// maximal number of threads to launch
final
int
debugLevel
){
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
String
x3d_path
=
getX3dDirectory
();
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
if
((
getGPU
()
!=
null
)
&&
(
getGPU
().
getQuadCLT
()
!=
this
))
{
...
...
@@ -2224,11 +2220,7 @@ public class QuadCLT extends QuadCLTCPU {
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
// Save as individual JPEG images in the model directory
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
image_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
x3d_path
=
getX3dDirectory
();
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
...
...
@@ -2759,11 +2751,7 @@ public class QuadCLT extends QuadCLTCPU {
if
(
clt_parameters
.
gen_4_img
)
{
// save 4 JPEG images
// Save as individual JPEG images in the model directory
String
x3d_path
=
quadCLT_main
.
correctionsParameters
.
selectX3dDirectory
(
name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
quadCLT_main
.
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
x3d_path
=
quadCLT_main
.
getX3dDirectory
();
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
155415d8
...
...
@@ -329,6 +329,26 @@ public class QuadCLTCPU {
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
(
String
suffix
,
boolean
silent
)
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
...
...
@@ -344,11 +364,7 @@ public class QuadCLTCPU {
String
suffix
,
// "-DSI_COMBO", "-DSI_MAIN" (DSI_COMBO_SUFFIX, DSI_MAIN_SUFFIX)
double
[][]
dsi
,
boolean
silent
)
{
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
String
x3d_path
=
getX3dDirectory
();
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
image_name
+
suffix
+
".tiff"
;
ImagePlus
imp
=
null
;
try
{
...
...
@@ -404,12 +420,8 @@ public class QuadCLTCPU {
}
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
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
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
String
x3d_path
=
getX3dDirectory
();
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
}
Properties
inter_properties
=
new
Properties
();
String
prefix
=
is_aux
?
PREFIX_AUX:
PREFIX
;
...
...
@@ -465,12 +477,8 @@ public class QuadCLTCPU {
}
if
(!
path
.
contains
(
Prefs
.
getFileSeparator
()))
{
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
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
String
x3d_path
=
getX3dDirectory
();
path
=
x3d_path
+
Prefs
.
getFileSeparator
()+
path
;
}
properties
=
loadProperties
(
path
,
// String path,
...
...
@@ -827,11 +835,7 @@ public class QuadCLTCPU {
final
int
num_cams
=
this
.
image_data
.
length
;
final
int
num_cols
=
image_data
[
0
].
length
;
final
int
[]
image_wh
=
geometryCorrection
.
getSensorWH
();
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
String
x3d_path
=
getX3dDirectory
();
String
noise_suffix
=
suffix
+
sigma
;
String
file_name
=
image_name
+
noise_suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
...
...
@@ -962,11 +966,7 @@ public class QuadCLTCPU {
int
width
,
int
height
)
{
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
String
x3d_path
=
getX3dDirectory
();
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
ImageStack
imageStack
=
(
new
ShowDoubleFloatArrays
()).
makeStack
(
data
,
width
,
height
,
labels
);
...
...
@@ -984,11 +984,7 @@ public class QuadCLTCPU {
)
{
// final int [] image_wh = geometryCorrection.getSensorWH();
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
String
x3d_path
=
getX3dDirectory
();
String
file_name
=
image_name
+
suffix
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
+
".tiff"
;
ImagePlus
imp
=
null
;
...
...
@@ -1030,19 +1026,15 @@ public class QuadCLTCPU {
double
[][]
dsi
)
{
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
String
title
=
image_name
+
TwoQuadCLT
.
DSI_COMBO_SUFFIX
;
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
eyesisCorrections
.
saveAndShow
(
imp
,
// ImagePlus imp,
x3d_path
,
// String path,
false
,
// boolean png,
false
,
// boolean show,
0
);
// int jpegQuality)
String
x3d_path
=
getX3dDirectory
();
String
title
=
image_name
+
TwoQuadCLT
.
DSI_COMBO_SUFFIX
;
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
eyesisCorrections
.
saveAndShow
(
imp
,
// ImagePlus imp,
x3d_path
,
// String path,
false
,
// boolean png,
false
,
// boolean show,
0
);
// int jpegQuality)
}
public
void
showDSI
(){
showDSI
(
this
.
dsi
);}
...
...
@@ -1056,11 +1048,7 @@ public class QuadCLTCPU {
public
void
saveDSIMain
(
double
[][]
dsi
)
// DSI_SLICES.length
{
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
String
x3d_path
=
getX3dDirectory
();
String
title
=
image_name
+
"-DSI_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
]};
...
...
@@ -1078,11 +1066,7 @@ public class QuadCLTCPU {
String
suffix
,
// "-DSI_MAIN"
double
[][]
dsi
)
// DSI_SLICES.length
{
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
String
x3d_path
=
getX3dDirectory
();
String
title
=
image_name
+
suffix
;
// "-DSI_MAIN";
ImagePlus
imp
=
(
new
ShowDoubleFloatArrays
()).
makeArrays
(
dsi
,
tp
.
getTilesX
(),
tp
.
getTilesY
(),
title
,
TwoQuadCLT
.
DSI_SLICES
);
eyesisCorrections
.
saveAndShow
(
...
...
@@ -1101,11 +1085,7 @@ public class QuadCLTCPU {
QuadCLT
quadCLT_aux
,
double
[][]
dsi_aux_from_main
)
{
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
String
x3d_path
=
getX3dDirectory
();
String
title
=
quadCLT_aux
.
image_name
+
"-DSI_GT-AUX"
;
// String [] titles = {DSI_SLICES[DSI_DISPARITY_MAIN], DSI_SLICES[DSI_STRENGTH_MAIN]};
// double [][] dsi_main = {dsi[DSI_DISPARITY_MAIN], dsi[DSI_STRENGTH_MAIN]};
...
...
@@ -5955,11 +5935,7 @@ public class QuadCLTCPU {
}
if
(
clt_parameters
.
gen_4_img
)
{
// Save as individual JPEG images in the model directory
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
image_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
x3d_path
=
getX3dDirectory
();
for
(
int
sub_img
=
0
;
sub_img
<
imps_RGB
.
length
;
sub_img
++){
EyesisCorrections
.
saveAndShow
(
imps_RGB
[
sub_img
],
...
...
@@ -11047,12 +11023,7 @@ public class QuadCLTCPU {
tp
.
clt_3d_passes
.
get
(
next_pass
-
1
),
// CLTPass3d scan,
"after_pass3-"
+(
next_pass
-
1
));
//String title)
}
String
x3d_path
=
correctionsParameters
.
selectX3dDirectory
(
// for x3d and obj
correctionsParameters
.
getModelName
(
this
.
image_name
),
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
correctionsParameters
.
x3dModelVersion
,
true
,
// smart,
true
);
//newAllowed, // save
String
x3d_path
=
getX3dDirectory
();
// create x3d file
if
(
clt_parameters
.
output_x3d
)
{
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