if (DEBUG_LEVEL>0) System.out.println("Image acquisition (@"+FOCUS_MEASUREMENT_PARAMETERS.sensorTemperature+"C) done at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
// reset matchSimulatedPattern, so it will start from scratch
matchSimulatedPattern= new MatchSimulatedPattern(DISTORTION.FFTSize); // new instance, all reset
// next 2 lines are not needed for the new instance, but can be used alternatively if keeipg it
matchSimulatedPattern.invalidateFlatFieldForGrid(); //Reset Flat Field calibration - different image.
matchSimulatedPattern.invalidateFocusMask();
if (matchSimulatedPattern.getPointersXY(imp_sel,LASER_POINTERS.laserUVMap.length)==null) { // no pointers in this image
IJ.showMessage("Error","No laser pointers detected - they are needed for absolute grid positioning\nProcess canceled");
return;
}
matchSimulatedPattern.debugLevel=DEBUG_LEVEL;
int numAbsolutePoints=LENS_ADJUSTMENT.updateFocusGrid(
LENS_DISTORTION_PARAMETERS.px0, // pixel coordinate of the the optical center
LENS_DISTORTION_PARAMETERS.py0, // pixel coordinate of the the optical center
imp_sel,
matchSimulatedPattern,
DISTORTION,
FOCUS_MEASUREMENT_PARAMETERS,
PATTERN_DETECT,
LASER_POINTERS,
SIMUL,
false, // keep (not remove) non-PSF areas
COMPONENTS.equalizeGreens,
THREADS_MAX,
UPDATE_STATUS,
// DEBUG_LEVEL);
DISTORTION.loop_debug_level);
if (numAbsolutePoints<=0) { // no pointers in this image
String msg="No laser pointers matched - they are needed for absolute grid positioning\nProcess canceled";
IJ.showMessage("Error",msg);
System.out.println("Error: "+msg);
return;
if (DEBUG_LEVEL>0) System.out.println("Image acquisition (@"+FOCUS_MEASUREMENT_PARAMETERS.sensorTemperature+"C) done at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
// reset matchSimulatedPattern, so it will start from scratch
matchSimulatedPatternSet[imgCounter] = new MatchSimulatedPattern(DISTORTION.FFTSize); // new instance, all reset
// next 2 lines are not needed for the new instance, but can be used alternatively if keeipg it
matchSimulatedPatternSet[imgCounter].invalidateFlatFieldForGrid(); //Reset Flat Field calibration - different image.