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) {
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(
this.SYNC_COMMAND.stopRequested,
......@@ -9213,6 +9230,7 @@ if (MORE_BUTTONS) {
PATTERN_DETECT, // MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
SIMUL, //SimulationPattern.SimulParameters simulParameters,
COMPONENTS, //boolean equalizeGreens,
resetBadKernels,
THREADS_MAX, // int threadsMax,
UPDATE_STATUS,
DISTORTION.loop_debug_level, // int loopDebugLevel, // debug level used inside loops
......
......@@ -1066,6 +1066,7 @@ public class EyesisAberrations {
MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
SimulationPattern.SimulParameters simulParameters,
ColorComponents colorComponents,
boolean resetBadKernels, // ignore and reset noUsefulKernels mark for seleccted channel
int threadsMax,
boolean updateStatus,
int loopDebugLevel, // debug level used inside loops
......@@ -1085,7 +1086,11 @@ public class EyesisAberrations {
}
long startTime=System.nanoTime(); // restart timer after possible interactive dialogs
// 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);
int numSelected=0;
int numDeselected=0;
......@@ -1102,7 +1107,10 @@ public class EyesisAberrations {
if (!selectedChannels[numChannel]){
selectedImages[imgNum]=false;
numDeselected++;
} else numSelected++;
}else{
distortions.fittingStrategy.setNoUsefulPSFKernels(imgNum,false); // reset noUsefulKernels mark (if it was not set - OK)
numSelected++;
}
} else if (debugLevel>1){
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