Commit 26d4a190 authored by Andrey Filippov's avatar Andrey Filippov

fixed some bugs, retesting

parent e686150e
......@@ -6694,6 +6694,7 @@ public class CuasMotion {
final double [][][] target_sequence = new double[num_seq][num_tiles][];
final Thread[] threads = ImageDtt.newThreadArray();
final AtomicInteger ai = new AtomicInteger(0);
System.out.println("convertFromMultiTarget(): minimal_score="+minimal_score+", min_seq="+min_seq+", enough_seq="+enough_seq);
for (int ithread = 0; ithread < threads.length; ithread++) {
threads[ithread] = new Thread() {
......@@ -6706,7 +6707,7 @@ public class CuasMotion {
double [][] targets = target_multi[nSeq][ntile];
if ((targets != null) && (targets.length > 0)) {
if (targets[0][CuasMotionLMA.RSLT_FAIL] == CuasMotionLMA.FAIL_NONE) {
if (targets[0][CuasMotionLMA.RSLT_MATCH_LENGTH] ==enough_seq) {
if (targets[0][CuasMotionLMA.RSLT_MATCH_LENGTH] >=(enough_seq-1)) {
target_sequence[nSeq][ntile] = targets[0];
remain[nSeq]++;
} else if ((targets[0][CuasMotionLMA.RSLT_QSCORE] >= minimal_score) && (targets[0][CuasMotionLMA.RSLT_MATCH_LENGTH] >= (min_seq-1))) {
......@@ -9176,7 +9177,7 @@ public class CuasMotion {
// interseq_scale = (half_step ? 0.25 : 0.5) // ???
if (debugLevel > -4) System.out.println("\nStarting resolution of conflicting tiles.");
boolean good_only= true;
boolean good_only= false; // true;
boolean show_empty = true; // false; // show scenes with no (valid) targets
boolean trim_nulls = true;
final double duplicate_tolerance = clt_parameters.imp.cuas_duplicate_tolerance ; // 2.0; // (pix) Remove weaker maximums closer than this to a stronger one
......@@ -9327,15 +9328,29 @@ public class CuasMotion {
// apply filter5 to targets_good
findStrongerNeighbor(// does not modify "when"
targets_multi, // final double [][][][] target_multi,
targets_multi, // final double [][][][] target_multi,
filter5, // final boolean [][] filter5)
true, // false, // final boolean mark_failed,
cuasMotion.tilesX); // final int tilesX) {
true, // false, // final boolean mark_failed,
cuasMotion.tilesX); // final int tilesX) {
if (intermed_low && debug_more) {
ImagePlus imp_neibs = showTargetSequence(
targets_multi, // double [][][] vector_fields_sequence,
slice_titles, // String [] titles, // all slices*frames titles or just slice titles or null
model_prefix+"-STRONGER-NEIBS",// String title,
good_only, // final boolean good_only,
show_empty, // final boolean show_empty, // show scenes with no (valid) targets
!batch_mode, // boolean show,
cuasMotion.tilesX); // int tilesX) {
parentCLT.saveImagePlusInModelDirectory(imp_neibs); // ImagePlus imp)
}
// now failed by neighbors are marked as non-NaN (tile index or -1), not as failed
// here failed by stronger neighbors are also removed (balance weights if needed)
// maybe also needed to remove all under threshold here
sortMultiTargets(
sortMultiTargets( // stronger neibs will be incorrect
targets_multi, // final double [][][][] target_multi,
true); // trim_nulls); // final boolean trim_nulls) { // trim null targets
// final with all multi-target data
......
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