Commit cbbac8c8 authored by Andrey Filippov's avatar Andrey Filippov

Added an option to reset "no useful kernels" flag for the processed

images
parent 52b6cf3c
...@@ -9196,6 +9196,23 @@ if (MORE_BUTTONS) { ...@@ -9196,6 +9196,23 @@ if (MORE_BUTTONS) {
return; return;
} }
boolean [] selectedChannels=null;
if (ABERRATIONS_PARAMETERS!=null){
selectedChannels=ABERRATIONS_PARAMETERS.getChannelSelection(LENS_DISTORTIONS);
}
String s="";
if (selectedChannels != null) {
for (boolean b:selectedChannels)s+=b?"+":"-";
}
boolean resetBadKernels=false;
GenericDialog gd = new GenericDialog("Partial kernel calculation");
gd.addMessage("Selected channels: "+s+" (you may change selection with \"Select Channels\" command)");
gd.addCheckbox("Re-process images marked with \"no useful kernels\" during previouis processing",resetBadKernels);
gd.showDialog();
if (gd.wasCanceled()) return;
resetBadKernels=gd.getNextBoolean();
EYESIS_ABERRATIONS.createPartialKernels( EYESIS_ABERRATIONS.createPartialKernels(
this.SYNC_COMMAND.stopRequested, this.SYNC_COMMAND.stopRequested,
...@@ -9213,6 +9230,7 @@ if (MORE_BUTTONS) { ...@@ -9213,6 +9230,7 @@ if (MORE_BUTTONS) {
PATTERN_DETECT, // MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, PATTERN_DETECT, // MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
SIMUL, //SimulationPattern.SimulParameters simulParameters, SIMUL, //SimulationPattern.SimulParameters simulParameters,
COMPONENTS, //boolean equalizeGreens, COMPONENTS, //boolean equalizeGreens,
resetBadKernels,
THREADS_MAX, // int threadsMax, THREADS_MAX, // int threadsMax,
UPDATE_STATUS, UPDATE_STATUS,
DISTORTION.loop_debug_level, // int loopDebugLevel, // debug level used inside loops DISTORTION.loop_debug_level, // int loopDebugLevel, // debug level used inside loops
......
...@@ -1066,6 +1066,7 @@ public class EyesisAberrations { ...@@ -1066,6 +1066,7 @@ public class EyesisAberrations {
MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
SimulationPattern.SimulParameters simulParameters, SimulationPattern.SimulParameters simulParameters,
ColorComponents colorComponents, ColorComponents colorComponents,
boolean resetBadKernels, // ignore and reset noUsefulKernels mark for seleccted channel
int threadsMax, int threadsMax,
boolean updateStatus, boolean updateStatus,
int loopDebugLevel, // debug level used inside loops int loopDebugLevel, // debug level used inside loops
...@@ -1085,7 +1086,11 @@ public class EyesisAberrations { ...@@ -1085,7 +1086,11 @@ public class EyesisAberrations {
} }
long startTime=System.nanoTime(); // restart timer after possible interactive dialogs long startTime=System.nanoTime(); // restart timer after possible interactive dialogs
// long tmpTime; // long tmpTime;
boolean [] selectedImages=distortions.fittingStrategy.selectedImagesNoBadKernels(this.aberrationParameters.allImages?-1:this.aberrationParameters.seriesNumber); // negative series number OK - will select all enabled //resetBadKernels
int serNumber=this.aberrationParameters.allImages?-1:this.aberrationParameters.seriesNumber;
boolean [] selectedImages=resetBadKernels?
distortions.fittingStrategy.selectedImages(serNumber):
distortions.fittingStrategy.selectedImagesNoBadKernels(serNumber); // negative series number OK - will select all enabled
boolean [] selectedChannels=this.aberrationParameters.getChannelSelection(distortions); boolean [] selectedChannels=this.aberrationParameters.getChannelSelection(distortions);
int numSelected=0; int numSelected=0;
int numDeselected=0; int numDeselected=0;
...@@ -1102,7 +1107,10 @@ public class EyesisAberrations { ...@@ -1102,7 +1107,10 @@ public class EyesisAberrations {
if (!selectedChannels[numChannel]){ if (!selectedChannels[numChannel]){
selectedImages[imgNum]=false; selectedImages[imgNum]=false;
numDeselected++; numDeselected++;
} else numSelected++; }else{
distortions.fittingStrategy.setNoUsefulPSFKernels(imgNum,false); // reset noUsefulKernels mark (if it was not set - OK)
numSelected++;
}
} else if (debugLevel>1){ } else if (debugLevel>1){
System.out.println("Skipping disabled image "+imgNum); System.out.println("Skipping disabled image "+imgNum);
} }
......
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