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
75d7b5e2
Commit
75d7b5e2
authored
Aug 27, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more controls
parent
e12ae0b2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
10 deletions
+39
-10
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+14
-3
EyesisCorrections.java
src/main/java/EyesisCorrections.java
+22
-5
Eyesis_Correction.java
src/main/java/Eyesis_Correction.java
+1
-1
QuadCLT.java
src/main/java/QuadCLT.java
+2
-1
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
75d7b5e2
...
@@ -510,7 +510,8 @@ public class EyesisCorrectionParameters {
...
@@ -510,7 +510,8 @@ public class EyesisCorrectionParameters {
return
true
;
return
true
;
}
}
public
boolean
showCLTDialog
(
String
title
)
{
public
boolean
showCLTDialog
(
String
title
,
CLTParameters
clt_parameters
)
{
GenericDialog
gd
=
new
GenericDialog
(
title
);
GenericDialog
gd
=
new
GenericDialog
(
title
);
gd
.
addCheckbox
(
"Save current settings with results"
,
this
.
saveSettings
);
// 1
gd
.
addCheckbox
(
"Save current settings with results"
,
this
.
saveSettings
);
// 1
...
@@ -551,8 +552,13 @@ public class EyesisCorrectionParameters {
...
@@ -551,8 +552,13 @@ public class EyesisCorrectionParameters {
gd
.
addCheckbox
(
"Assign tiles to surfaces"
,
this
.
clt_batch_assign
);
// 26
gd
.
addCheckbox
(
"Assign tiles to surfaces"
,
this
.
clt_batch_assign
);
// 26
gd
.
addCheckbox
(
"Generate 3d output: x3d and/or obj+mtl"
,
this
.
clt_batch_gen3d
);
// 27
gd
.
addCheckbox
(
"Generate 3d output: x3d and/or obj+mtl"
,
this
.
clt_batch_gen3d
);
// 27
gd
.
addCheckbox
(
"Generate debug images if a single set is selected"
,
this
.
clt_batch_dbg1
);
// 28
gd
.
addCheckbox
(
"Generate debug images if a single set is selected"
,
this
.
clt_batch_dbg1
);
// 28
if
(
clt_parameters
!=
null
)
{
gd
.
addMessage
(
"============ selected CLT parameters ============"
);
gd
.
addNumericField
(
"Maximal disparity to try"
,
clt_parameters
.
grow_disp_max
,
6
);
gd
.
addCheckbox
(
"Equalize green channel gain of the individual cnannels (bug fix for exposure)"
,
clt_parameters
.
gain_equalize
);
gd
.
addNumericField
(
"Inverse distance to infinity (misalignment correction)"
,
clt_parameters
.
z_correction
,
6
);
}
WindowTools
.
addScrollBars
(
gd
);
WindowTools
.
addScrollBars
(
gd
);
gd
.
showDialog
();
gd
.
showDialog
();
if
(
gd
.
wasCanceled
())
return
false
;
if
(
gd
.
wasCanceled
())
return
false
;
...
@@ -584,6 +590,11 @@ public class EyesisCorrectionParameters {
...
@@ -584,6 +590,11 @@ public class EyesisCorrectionParameters {
this
.
clt_batch_assign
=
gd
.
getNextBoolean
();
// 26
this
.
clt_batch_assign
=
gd
.
getNextBoolean
();
// 26
this
.
clt_batch_gen3d
=
gd
.
getNextBoolean
();
// 27
this
.
clt_batch_gen3d
=
gd
.
getNextBoolean
();
// 27
this
.
clt_batch_dbg1
=
gd
.
getNextBoolean
();
// 28
this
.
clt_batch_dbg1
=
gd
.
getNextBoolean
();
// 28
if
(
clt_parameters
!=
null
)
{
clt_parameters
.
grow_disp_max
=
gd
.
getNextNumber
();
clt_parameters
.
gain_equalize
=
gd
.
getNextBoolean
();
clt_parameters
.
z_correction
=
gd
.
getNextNumber
();
}
return
true
;
return
true
;
}
}
...
@@ -3947,7 +3958,7 @@ public class EyesisCorrectionParameters {
...
@@ -3947,7 +3958,7 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Do not try to correct vignetting smaller than this fraction of max"
,
this
.
vignetting_range
,
3
);
gd
.
addNumericField
(
"Do not try to correct vignetting smaller than this fraction of max"
,
this
.
vignetting_range
,
3
);
gd
.
addNumericField
(
"Kernel step in pixels (has 1 kernel margin on each side)"
,
this
.
kernel_step
,
0
);
gd
.
addNumericField
(
"Kernel step in pixels (has 1 kernel margin on each side)"
,
this
.
kernel_step
,
0
);
gd
.
addNumericField
(
"Nominal (rectilinear) disparity between side of square cameras (pix)"
,
this
.
disparity
,
3
);
gd
.
addNumericField
(
"Nominal (rectilinear) disparity between side of square cameras (pix)"
,
this
.
disparity
,
3
);
gd
.
addNumericField
(
"Inverse distance to infinity (misalignment cor
trection)"
,
this
.
z_correction
,
6
);
gd
.
addNumericField
(
"Inverse distance to infinity (misalignment cor
rection)"
,
this
.
z_correction
,
6
);
gd
.
addCheckbox
(
"Perform correlation"
,
this
.
correlate
);
gd
.
addCheckbox
(
"Perform correlation"
,
this
.
correlate
);
gd
.
addNumericField
(
"Bitmask of pairs to combine in the composite (top, bottom, left,righth)"
,
this
.
corr_mask
,
0
);
gd
.
addNumericField
(
"Bitmask of pairs to combine in the composite (top, bottom, left,righth)"
,
this
.
corr_mask
,
0
);
gd
.
addCheckbox
(
"Combine correlation with mirrored around disparity direction"
,
this
.
corr_sym
);
gd
.
addCheckbox
(
"Combine correlation with mirrored around disparity direction"
,
this
.
corr_sym
);
...
...
src/main/java/EyesisCorrections.java
View file @
75d7b5e2
...
@@ -2374,6 +2374,23 @@ public class EyesisCorrections {
...
@@ -2374,6 +2374,23 @@ public class EyesisCorrections {
boolean
png
,
boolean
png
,
boolean
show
,
boolean
show
,
int
jpegQuality
){
// <0 - keep current, 0 - force Tiff, >0 use for JPEG
int
jpegQuality
){
// <0 - keep current, 0 - force Tiff, >0 use for JPEG
saveAndShow
(
imp
,
path
,
png
,
show
,
jpegQuality
,
// <0 - keep current, 0 - force Tiff, >0 use for JPEG
this
.
debugLevel
);
}
void
saveAndShow
(
ImagePlus
imp
,
String
path
,
boolean
png
,
boolean
show
,
int
jpegQuality
,
// <0 - keep current, 0 - force Tiff, >0 use for JPEG
int
debugLevel
){
if
(
path
!=
null
)
{
if
(
path
!=
null
)
{
path
+=
Prefs
.
getFileSeparator
()+
imp
.
getTitle
();
path
+=
Prefs
.
getFileSeparator
()+
imp
.
getTitle
();
boolean
hasAlphaHighByte
=
false
;
boolean
hasAlphaHighByte
=
false
;
...
@@ -2389,14 +2406,14 @@ public class EyesisCorrections {
...
@@ -2389,14 +2406,14 @@ public class EyesisCorrections {
if
(
hasAlphaHighByte
){
if
(
hasAlphaHighByte
){
if
(
png
){
if
(
png
){
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"Saving RGBA result to "
+
path
+
".png"
);
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Saving RGBA result to "
+
path
+
".png"
);
(
new
EyesisTiff
()).
savePNG_ARGB32
(
(
new
EyesisTiff
()).
savePNG_ARGB32
(
imp
,
imp
,
path
+
".png"
path
+
".png"
);
);
}
else
{
}
else
{
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"Saving RGBA result to "
+
path
+
".tiff"
);
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Saving RGBA result to "
+
path
+
".tiff"
);
try
{
try
{
(
new
EyesisTiff
()).
saveTiffARGB32
(
(
new
EyesisTiff
()).
saveTiffARGB32
(
imp
,
imp
,
...
@@ -2415,12 +2432,12 @@ public class EyesisCorrections {
...
@@ -2415,12 +2432,12 @@ public class EyesisCorrections {
}
}
}
else
if
(((
imp
.
getStackSize
()==
1
))
&&
(
jpegQuality
!=
0
)
&&
((
imp
.
getFileInfo
().
fileType
==
FileInfo
.
RGB
)
||
(
jpegQuality
>
0
)))
{
}
else
if
(((
imp
.
getStackSize
()==
1
))
&&
(
jpegQuality
!=
0
)
&&
((
imp
.
getFileInfo
().
fileType
==
FileInfo
.
RGB
)
||
(
jpegQuality
>
0
)))
{
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".jpeg"
);
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".jpeg"
);
FileSaver
fs
=
new
FileSaver
(
imp
);
FileSaver
fs
=
new
FileSaver
(
imp
);
if
(
jpegQuality
>
0
)
FileSaver
.
setJpegQuality
(
jpegQuality
);
if
(
jpegQuality
>
0
)
FileSaver
.
setJpegQuality
(
jpegQuality
);
fs
.
saveAsJpeg
(
path
+
".jpeg"
);
fs
.
saveAsJpeg
(
path
+
".jpeg"
);
}
else
{
}
else
{
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".tiff"
);
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".tiff"
);
FileSaver
fs
=
new
FileSaver
(
imp
);
FileSaver
fs
=
new
FileSaver
(
imp
);
// Save as RGBA if it is RGBA
// Save as RGBA if it is RGBA
int
bytesPerPixel
=
imp
.
getBytesPerPixel
();
int
bytesPerPixel
=
imp
.
getBytesPerPixel
();
...
@@ -2468,7 +2485,7 @@ public class EyesisCorrections {
...
@@ -2468,7 +2485,7 @@ public class EyesisCorrections {
if
(
path
!=
null
)
{
if
(
path
!=
null
)
{
path
+=
Prefs
.
getFileSeparator
()+
compositeImage
.
getTitle
();
path
+=
Prefs
.
getFileSeparator
()+
compositeImage
.
getTitle
();
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".tiff"
);
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Saving result to "
+
path
+
".tiff"
);
FileSaver
fs
=
new
FileSaver
(
compositeImage
);
FileSaver
fs
=
new
FileSaver
(
compositeImage
);
if
(
compositeImage
.
getStackSize
()>
1
)
fs
.
saveAsTiffStack
(
path
+
".tiff"
);
if
(
compositeImage
.
getStackSize
()>
1
)
fs
.
saveAsTiffStack
(
path
+
".tiff"
);
else
fs
.
saveAsTiff
(
path
+
".tiff"
);
else
fs
.
saveAsTiff
(
path
+
".tiff"
);
...
...
src/main/java/Eyesis_Correction.java
View file @
75d7b5e2
...
@@ -3671,7 +3671,7 @@ private Panel panel1,
...
@@ -3671,7 +3671,7 @@ private Panel panel1,
/* ======================================================================== */
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Setup CLT Batch parameters"
))
{
}
else
if
(
label
.
equals
(
"Setup CLT Batch parameters"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
CORRECTION_PARAMETERS
.
showCLTDialog
(
"CLT Batch parameters"
);
CORRECTION_PARAMETERS
.
showCLTDialog
(
"CLT Batch parameters"
,
CLT_PARAMETERS
);
return
;
return
;
/* ======================================================================== */
/* ======================================================================== */
...
...
src/main/java/QuadCLT.java
View file @
75d7b5e2
...
@@ -4020,7 +4020,8 @@ public class QuadCLT {
...
@@ -4020,7 +4020,8 @@ public class QuadCLT {
x3d_path
,
x3d_path
,
correctionsParameters
.
png
&&
!
clt_parameters
.
black_back
,
correctionsParameters
.
png
&&
!
clt_parameters
.
black_back
,
!
batch_mode
&&
clt_parameters
.
show_textures
,
!
batch_mode
&&
clt_parameters
.
show_textures
,
correctionsParameters
.
JPEG_quality
);
// jpegQuality); // jpegQuality){// <0 - keep current, 0 - force Tiff, >0 use for JPEG
correctionsParameters
.
JPEG_quality
,
// jpegQuality); // jpegQuality){// <0 - keep current, 0 - force Tiff, >0 use for JPEG
(
debugLevel
>
0
)
?
debugLevel
:
1
);
// int debugLevel (print what it saves)
}
}
}
}
}
}
...
...
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