* Read (try to read) this first, maybe parent is not needed (yet)
* @param clt_parameters
* @param ref_clt
* @param full_path
* @param single_first true: read single first, cumulative second, false - read cumulative first
* @param debugLevel
* @return
*/
publicstaticQuadCLTrestoreCenterClt_old3(
CLTParametersclt_parameters,
QuadCLTref_clt,// latest
Stringfull_path,// if non-null, use it instead of ref_clt
booleansingle_first,// true: read single first, cumulative second
intdebugLevel){
// 1) read single from model directory (only .cuas) if single_first only model dir?
// 2) read cumulative from specified dir. If does not exist - try single from specified dir. If does not exist read old format. Read DSI from specified dir
// If both local and parent exist - combine
// If rad old-style from parent - save it there as cumulative
gd.addStringField("3D Model directory",model_directory,120,"Directory with 3D model to extract X,Y scales and captured images.");
gd.addStringField("3D Model state file",model_state_file,120,"3D model state file with images, elevation and scales as absolute values and directions.");
gd.addStringField("Synthesis directory",synth_directory,120,"Directory with the terrain/foliage model generation files.");
gd.addStringField("Scene name",synth_scene,40,"Name (timestamp) of the model.");
gd.addStringField("Model suffix",synth_model,120,"File name suffix for the model.");
gd.addStringField("Vegetation segments",synth_segments,120,"File name suffix for partial terrain/vegetation segments.");
gd.addStringField("Rendered suffix",synth_render_suffix,120,"Result file name suffix for the rendered synthetic images.");
gd.addCheckbox("Crop by real",synth_crop_real,"Crop synthetic by real.");
gd.addStringField("Scene offsets",synth_scene_offs,120,"Filenam suffix with scene offsets.");
gd.addCheckbox("Add scene offsets",synth_add_offs,"Add scene offsets (vignetting corrcetion).");
gd.addCheckbox("Update settings",update,"Update settings in the global parameters (wil require saving).");
gd.showDialog();
if(gd.wasCanceled())returnfalse;
...
...
@@ -63,11 +72,11 @@ public class VegetationSynthesis {
System.out.println("testSynthetic(): read scene offsets from: "+path_scene_offs+", got "+scene_offs_slices+" slices, will add them to the rendered images");
scene_offs=QuadCLT.readDoubleArray(
imp_scene_offs,// ImagePlus imp,
0,// int num_slices, // (0 - all)
wh);// int [] wh); // int [] wh)
addSceneOffsets(// modify captured images to correct vignetting
captured_images,// final double [][] synth, // will be modified
scene_offs,// final double [][] scene_offsets, // extracted NaN-s