Commit dafb1ad3 authored by Andrey Filippov's avatar Andrey Filippov

Cleaning up, preparing to the batch run

parent 7b15b76c
...@@ -2549,7 +2549,7 @@ public class EyesisCorrectionParameters { ...@@ -2549,7 +2549,7 @@ public class EyesisCorrectionParameters {
// select qualified (by 'name' - quad timestamp) x3d subdirectory // select qualified (by 'name' - quad timestamp) x3d subdirectory
public String selectX3dDirectory(String name, String version, boolean smart, boolean newAllowed) { public String selectX3dDirectory(String name, String version, boolean smart, boolean newAllowed) { // no trailing "/"
String dir= CalibrationFileManagement.selectDirectory( String dir= CalibrationFileManagement.selectDirectory(
smart, smart,
newAllowed, // save newAllowed, // save
......
...@@ -743,6 +743,21 @@ min_str_neib_fpn 0.35 ...@@ -743,6 +743,21 @@ min_str_neib_fpn 0.35
public double cuas_lma_mink = 0.0; // Minimal K (overshoot) = 0.0 (<0.007) public double cuas_lma_mink = 0.0; // Minimal K (overshoot) = 0.0 (<0.007)
public double cuas_lma_maxk = 5.0; // Maximal K (overshoot) = 5.0 (>3.8) public double cuas_lma_maxk = 5.0; // Maximal K (overshoot) = 5.0 (>3.8)
public double cuas_mask_width = 9;
public double cuas_mask_blur = 3;
public boolean cuas_mask_round = false;
public int cuas_target_type = 0; // 0 - unknown, 1 - known, 2 - friend, 3 - foe
public double cuas_input_range = 5;
public boolean cuas_scale2x = true;
public boolean cuas_ra_background = true; // apply running average to the background of the moving targets (false - use high-noise no-averaged images
// which files to save in the model directory:
public boolean cuas_intermed_low = true; // save intermediate vector fields and target coordinates from the LMA (80x64 layers)
public boolean cuas_intermed_high = true; // save pixel-resolution accumulated images (640x512)
public boolean cuas_save_mono = true; // save 32-bit monochrome target+backgrounds Tiffs (before optional scaling)
public boolean cuas_save_color = true; // save color rendered images (same as videos)
public boolean cuas_save_video = true; // save color rendered images (same as videos)
public boolean cuas_debug = false; // save debug images (and show them if not in batch mode) public boolean cuas_debug = false; // save debug images (and show them if not in batch mode)
public boolean cuas_step_debug = false; // save debug images during per-step cuas recalculation (and show them if not in batch mode) public boolean cuas_step_debug = false; // save debug images during per-step cuas recalculation (and show them if not in batch mode)
...@@ -2238,6 +2253,38 @@ min_str_neib_fpn 0.35 ...@@ -2238,6 +2253,38 @@ min_str_neib_fpn 0.35
gd.addNumericField("Maximal overshoot ratio", this.cuas_lma_maxk, 5,8,"", gd.addNumericField("Maximal overshoot ratio", this.cuas_lma_maxk, 5,8,"",
"Maximal ratio of the overshoot radius to the first 0 radius (typical 3.0)."); "Maximal ratio of the overshoot radius to the first 0 radius (typical 3.0).");
gd.addMessage("=== Targets video generation (see also Vidoe/Stereo tab) ===");
gd.addNumericField("Mask diameter", this.cuas_mask_width, 5,8,"pix",
"Taget mask to replace static background with moving target.");
gd.addNumericField("Mask transition width", this.cuas_mask_blur, 5,8,"pix",
"Transition between opaque and transparent mask.");
gd.addCheckbox ("Mask round", this.cuas_mask_round,
"Use round mask. Unchesked - use sharp square mask without any transition.");
gd.addNumericField("Targets icon type", this.cuas_target_type, 0,3,"",
"0 - unknown (dashed square), 1 - known (square), 2 - friend (circle), 3 - foe (diamond).");
gd.addNumericField("Image range", this.cuas_input_range, 5,8,"10mK",
"Dispaly pixel values range (1.0 ~= 10 mK).");
gd.addCheckbox ("Scale images twice", this.cuas_scale2x,
"Scale imges to 1280x1024 for higher annotation quality.");
gd.addCheckbox ("Smooth background with runnong average", this.cuas_ra_background,
"Apply running average to the background of the moving targets (false - use high-noise no-averaged images.");
gd.addMessage("=== Saving intermediate and final images and video ===");
gd.addCheckbox ("Save tile-resolution intermediate images", this.cuas_intermed_low,
"Save intermediate vector fields and target coordinates from the LMA (80x64 layers).");
gd.addCheckbox ("Save pixel-resolution intermediate images",this.cuas_intermed_high,
"Save pixel-resolution accumulated images (640x512).");
gd.addCheckbox ("Save monochrome targets+background", this.cuas_save_mono,
"Save 32-bit monochrome targets+background Tiffs (before optional scaling).");
gd.addCheckbox ("Save color targets+background", this.cuas_save_color,
"Save color rendered images (same as videos), optionally scaled.");
gd.addCheckbox ("Save videos", this.cuas_save_video,
"Save video with moving targets.");
gd.addMessage("=== Debug ==="); gd.addMessage("=== Debug ===");
gd.addCheckbox ("Save/show debug images", this.cuas_debug, gd.addCheckbox ("Save/show debug images", this.cuas_debug,
"Save CUAS-related debug images and show them in non-batch mode."); "Save CUAS-related debug images and show them in non-batch mode.");
...@@ -3227,6 +3274,20 @@ min_str_neib_fpn 0.35 ...@@ -3227,6 +3274,20 @@ min_str_neib_fpn 0.35
this.cuas_lma_mink = gd.getNextNumber(); this.cuas_lma_mink = gd.getNextNumber();
this.cuas_lma_maxk = gd.getNextNumber(); this.cuas_lma_maxk = gd.getNextNumber();
this.cuas_mask_width = gd.getNextNumber();
this.cuas_mask_blur = gd.getNextNumber();
this.cuas_mask_round = gd.getNextBoolean();
this.cuas_target_type= (int) gd.getNextNumber();
this.cuas_input_range = gd.getNextNumber();
this.cuas_scale2x = gd.getNextBoolean();
this.cuas_ra_background = gd.getNextBoolean();
this.cuas_intermed_low = gd.getNextBoolean();
this.cuas_intermed_high = gd.getNextBoolean();
this.cuas_save_mono = gd.getNextBoolean();
this.cuas_save_color = gd.getNextBoolean();
this.cuas_save_video = gd.getNextBoolean();
this.cuas_debug = gd.getNextBoolean(); this.cuas_debug = gd.getNextBoolean();
this.cuas_step_debug = gd.getNextBoolean(); this.cuas_step_debug = gd.getNextBoolean();
...@@ -4143,6 +4204,20 @@ min_str_neib_fpn 0.35 ...@@ -4143,6 +4204,20 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_lma_mink", this.cuas_lma_mink+""); // double properties.setProperty(prefix+"cuas_lma_mink", this.cuas_lma_mink+""); // double
properties.setProperty(prefix+"cuas_lma_maxk", this.cuas_lma_maxk+""); // double properties.setProperty(prefix+"cuas_lma_maxk", this.cuas_lma_maxk+""); // double
properties.setProperty(prefix+"cuas_mask_width", this.cuas_mask_width+""); // double
properties.setProperty(prefix+"cuas_mask_blur", this.cuas_mask_blur+""); // double
properties.setProperty(prefix+"cuas_mask_round", this.cuas_mask_round+""); // boolean
properties.setProperty(prefix+"cuas_target_type", this.cuas_target_type+""); // int
properties.setProperty(prefix+"cuas_input_range", this.cuas_input_range+""); // double
properties.setProperty(prefix+"cuas_scale2x", this.cuas_scale2x+""); // boolean
properties.setProperty(prefix+"cuas_ra_background", this.cuas_ra_background+""); // boolean
properties.setProperty(prefix+"cuas_intermed_low", this.cuas_intermed_low+""); // boolean
properties.setProperty(prefix+"cuas_intermed_high", this.cuas_intermed_high+""); // boolean
properties.setProperty(prefix+"cuas_save_mono", this.cuas_save_mono+""); // boolean
properties.setProperty(prefix+"cuas_save_color", this.cuas_save_color+""); // boolean
properties.setProperty(prefix+"cuas_save_video", this.cuas_save_video+""); // boolean
properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean
properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean
...@@ -5032,6 +5107,20 @@ min_str_neib_fpn 0.35 ...@@ -5032,6 +5107,20 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_lma_mink")!=null) this.cuas_lma_mink=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_mink")); if (properties.getProperty(prefix+"cuas_lma_mink")!=null) this.cuas_lma_mink=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_mink"));
if (properties.getProperty(prefix+"cuas_lma_maxk")!=null) this.cuas_lma_maxk=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_maxk")); if (properties.getProperty(prefix+"cuas_lma_maxk")!=null) this.cuas_lma_maxk=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_maxk"));
if (properties.getProperty(prefix+"cuas_mask_width")!=null) this.cuas_mask_width=Double.parseDouble(properties.getProperty(prefix+"cuas_mask_width"));
if (properties.getProperty(prefix+"cuas_mask_blur")!=null) this.cuas_mask_blur=Double.parseDouble(properties.getProperty(prefix+"cuas_mask_blur"));
if (properties.getProperty(prefix+"cuas_mask_round")!=null) this.cuas_mask_round=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_mask_round"));
if (properties.getProperty(prefix+"cuas_target_type")!=null) this.cuas_target_type=Integer.parseInt(properties.getProperty(prefix+"cuas_target_type"));
if (properties.getProperty(prefix+"cuas_input_range")!=null) this.cuas_input_range=Double.parseDouble(properties.getProperty(prefix+"cuas_input_range"));
if (properties.getProperty(prefix+"cuas_scale2x")!=null) this.cuas_scale2x=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_scale2x"));
if (properties.getProperty(prefix+"cuas_ra_background")!=null) this.cuas_ra_background=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ra_background"));
if (properties.getProperty(prefix+"cuas_intermed_low")!=null) this.cuas_intermed_low=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_intermed_low"));
if (properties.getProperty(prefix+"cuas_intermed_high")!=null) this.cuas_intermed_high=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_intermed_high"));
if (properties.getProperty(prefix+"cuas_save_mono")!=null) this.cuas_save_mono=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_save_mono"));
if (properties.getProperty(prefix+"cuas_save_color")!=null) this.cuas_save_color=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_save_color"));
if (properties.getProperty(prefix+"cuas_save_video")!=null) this.cuas_save_video=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_save_video"));
if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug")); if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug"));
if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug")); if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug"));
...@@ -5920,6 +6009,20 @@ min_str_neib_fpn 0.35 ...@@ -5920,6 +6009,20 @@ min_str_neib_fpn 0.35
imp.cuas_lma_mink = this.cuas_lma_mink; imp.cuas_lma_mink = this.cuas_lma_mink;
imp.cuas_lma_maxk = this.cuas_lma_maxk; imp.cuas_lma_maxk = this.cuas_lma_maxk;
imp.cuas_mask_width = this.cuas_mask_width;
imp.cuas_mask_blur = this.cuas_mask_blur;
imp.cuas_mask_round = this.cuas_mask_round;
imp.cuas_target_type= this.cuas_target_type;
imp.cuas_input_range = this.cuas_input_range;
imp.cuas_scale2x = this.cuas_scale2x;
imp.cuas_ra_background = this.cuas_ra_background;
imp.cuas_intermed_low = this.cuas_intermed_low;
imp.cuas_intermed_high = this.cuas_intermed_high;
imp.cuas_save_mono = this.cuas_save_mono;
imp.cuas_save_color = this.cuas_save_color;
imp.cuas_save_video = this.cuas_save_video;
imp.cuas_debug = this.cuas_debug; imp.cuas_debug = this.cuas_debug;
imp.cuas_step_debug = this.cuas_step_debug; imp.cuas_step_debug = this.cuas_step_debug;
......
...@@ -5847,6 +5847,13 @@ public class QuadCLTCPU { ...@@ -5847,6 +5847,13 @@ public class QuadCLTCPU {
} }
public String saveImagePlusInModelDirectory( // use title as filename
ImagePlus imp) {
return saveImagePlusInModelDirectory(
null, // String suffix, // null - use title from the imp
imp); // ImagePlus imp)
}
public String saveImagePlusInModelDirectory( public String saveImagePlusInModelDirectory(
String suffix, // null - use title from the imp String suffix, // null - use title from the imp
ImagePlus imp) ImagePlus imp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment