Commit 9b8069a8 authored by Andrey Filippov's avatar Andrey Filippov

Refactored - split Distortions.java into individual class files

parent 9739c913
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -972,7 +972,7 @@ public class EyesisAberrations { ...@@ -972,7 +972,7 @@ public class EyesisAberrations {
public String [][] preparePartialKernelsFilesList( public String [][] preparePartialKernelsFilesList(
int debugLevel){ int debugLevel){
Distortions.DistortionCalibrationData distortionCalibrationData= distortions.fittingStrategy.distortionCalibrationData; DistortionCalibrationData distortionCalibrationData= distortions.fittingStrategy.distortionCalibrationData;
boolean [] selectedImages=distortions.fittingStrategy.selectedImagesNoBadKernels(this.aberrationParameters.allImages?-1:this.aberrationParameters.seriesNumber); // negative series number OK - will select all enabled boolean [] selectedImages=distortions.fittingStrategy.selectedImagesNoBadKernels(this.aberrationParameters.allImages?-1:this.aberrationParameters.seriesNumber); // negative series number OK - will select all enabled
int num=0; int num=0;
for (int imgNum=0;imgNum<selectedImages.length;imgNum++) if (selectedImages[imgNum]) num++; for (int imgNum=0;imgNum<selectedImages.length;imgNum++) if (selectedImages[imgNum]) num++;
...@@ -1072,7 +1072,7 @@ public class EyesisAberrations { ...@@ -1072,7 +1072,7 @@ public class EyesisAberrations {
int loopDebugLevel, // debug level used inside loops int loopDebugLevel, // debug level used inside loops
int debugLevel int debugLevel
){ ){
Distortions.DistortionCalibrationData distortionCalibrationData= distortions.fittingStrategy.distortionCalibrationData; DistortionCalibrationData distortionCalibrationData= distortions.fittingStrategy.distortionCalibrationData;
boolean partialToReprojected=this.aberrationParameters.partialToReprojected; boolean partialToReprojected=this.aberrationParameters.partialToReprojected;
boolean applySensorCorrection=this.aberrationParameters.partialCorrectSensor; boolean applySensorCorrection=this.aberrationParameters.partialCorrectSensor;
// this.distortions is set to top level LENS_DISTORTIONS // this.distortions is set to top level LENS_DISTORTIONS
......
This diff is collapsed.
This diff is collapsed.
...@@ -2516,7 +2516,7 @@ private Panel panel1,panel2,panel3,panel4,panel5,panel5a, panel6,panel7,panelPos ...@@ -2516,7 +2516,7 @@ private Panel panel1,panel2,panel3,panel4,panel5,panel5a, panel6,panel7,panelPos
return false; return false;
} }
/* ======================================================================== */ /* ======================================================================== */
private String [] selectSourceFiles(String [] defaultPaths) { public String [] selectSourceFiles(String [] defaultPaths) {
String []patterns={".jp4",".jp46",".tiff",".tif"}; String []patterns={".jp4",".jp46",".tiff",".tif"};
return selectFiles(false, // save return selectFiles(false, // save
"Source file(s) selection", // title "Source file(s) selection", // title
......
This diff is collapsed.
...@@ -47,16 +47,16 @@ horizontal axis: ...@@ -47,16 +47,16 @@ horizontal axis:
public CalibrationHardwareInterface.CamerasInterface cameras = null; public CalibrationHardwareInterface.CamerasInterface cameras = null;
// public CalibrationHardwareInterface.LaserPointers lasers = null; // public CalibrationHardwareInterface.LaserPointers lasers = null;
// public static CalibrationHardwareInterface.FocusingMotors motorsS=null; // public static CalibrationHardwareInterface.FocusingMotors motorsS=null;
// public Distortions.DistortionProcessConfiguration // public DistortionProcessConfiguration
// distortionProcessConfiguration=null; // distortionProcessConfiguration=null;
// public LensAdjustment.FocusMeasurementParameters focusMeasurementParameters = null; // public LensAdjustment.FocusMeasurementParameters focusMeasurementParameters = null;
// public Distortions.PatternParameters patternParameters=null; // public PatternParameters patternParameters=null;
// public Distortions.LensDistortionParameters // public LensDistortionParameters
// lensDistortionParameters=null; // lensDistortionParameters=null;
// public MatchSimulatedPattern.DistortionParameters distortion = null; // public MatchSimulatedPattern.DistortionParameters distortion = null;
public MatchSimulatedPattern.DistortionParameters distortionParametersDefault=null; public MatchSimulatedPattern.DistortionParameters distortionParametersDefault=null;
public Distortions.EyesisCameraParameters eyesisCameraParameters = null; public EyesisCameraParameters eyesisCameraParameters = null;
public MatchSimulatedPattern[] matchSimulatedPatterns = null; // =new public MatchSimulatedPattern[] matchSimulatedPatterns = null; // =new
// MatchSimulatedPattern(); // MatchSimulatedPattern();
...@@ -64,7 +64,7 @@ horizontal axis: ...@@ -64,7 +64,7 @@ horizontal axis:
MatchSimulatedPattern.PatternDetectParameters patternDetectParameters=null; MatchSimulatedPattern.PatternDetectParameters patternDetectParameters=null;
public SimulationPattern.SimulParameters simulParametersDefault=null; public SimulationPattern.SimulParameters simulParametersDefault=null;
public Goniometer.GoniometerParameters goniometerParameters = null; public Goniometer.GoniometerParameters goniometerParameters = null;
public Distortions.DistortionProcessConfiguration distortionProcessConfiguration=null; public DistortionProcessConfiguration distortionProcessConfiguration=null;
public int lastScanStep=-1; public int lastScanStep=-1;
public int debugLevel = 2; public int debugLevel = 2;
public double bottomRollerTilt=60.0; // decrease scan step if tilt is above this public double bottomRollerTilt=60.0; // decrease scan step if tilt is above this
...@@ -75,11 +75,11 @@ horizontal axis: ...@@ -75,11 +75,11 @@ horizontal axis:
MatchSimulatedPattern.DistortionParameters distortionParametersDefault, MatchSimulatedPattern.DistortionParameters distortionParametersDefault,
// MatchSimulatedPattern.DistortionParameters distortion, // MatchSimulatedPattern.DistortionParameters distortion,
MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
Distortions.EyesisCameraParameters eyesisCameraParameters, EyesisCameraParameters eyesisCameraParameters,
MatchSimulatedPattern.LaserPointer laserPointers, MatchSimulatedPattern.LaserPointer laserPointers,
SimulationPattern.SimulParameters simulParametersDefault, SimulationPattern.SimulParameters simulParametersDefault,
Goniometer.GoniometerParameters goniometerParameters, Goniometer.GoniometerParameters goniometerParameters,
Distortions.DistortionProcessConfiguration distortionProcessConfiguration DistortionProcessConfiguration distortionProcessConfiguration
) { ) {
this.cameras = cameras; this.cameras = cameras;
this.distortionParametersDefault = distortionParametersDefault; this.distortionParametersDefault = distortionParametersDefault;
...@@ -519,8 +519,8 @@ horizontal axis: ...@@ -519,8 +519,8 @@ horizontal axis:
public boolean testHintedTarget ( public boolean testHintedTarget (
ImagePlus[] images, ImagePlus[] images,
Distortions lensDistortions, // should not be null Distortions lensDistortions, // should not be null
Distortions.DistortionCalibrationData distortionCalibrationData, DistortionCalibrationData distortionCalibrationData,
Distortions.PatternParameters patternParameters, // should not be null PatternParameters patternParameters, // should not be null
boolean equalizeGreens, boolean equalizeGreens,
int threadsMax, int threadsMax,
boolean updateStatus, boolean updateStatus,
...@@ -677,7 +677,7 @@ horizontal axis: ...@@ -677,7 +677,7 @@ horizontal axis:
* *
* this.parameterMode[numSeries][i]=gd.getNextChoiceIndex(); * this.parameterMode[numSeries][i]=gd.getNextChoiceIndex();
Distortions.PatternParameters patternParameters, // should not be null PatternParameters patternParameters, // should not be null
boolean equalizeGreens, boolean equalizeGreens,
int threadsMax, int threadsMax,
boolean updateStatus, boolean updateStatus,
...@@ -724,8 +724,8 @@ horizontal axis: ...@@ -724,8 +724,8 @@ horizontal axis:
// MatchSimulatedPattern.PatternDetectParameters patternDetectParameters, // MatchSimulatedPattern.PatternDetectParameters patternDetectParameters,
// MatchSimulatedPattern.LaserPointer laserPointer, // null OK // MatchSimulatedPattern.LaserPointer laserPointer, // null OK
// SimulationPattern.SimulParameters simulParametersDefault, // SimulationPattern.SimulParameters simulParametersDefault,
Distortions.DistortionCalibrationData distortionCalibrationData, DistortionCalibrationData distortionCalibrationData,
Distortions.PatternParameters patternParameters, // should not be null PatternParameters patternParameters, // should not be null
Distortions lensDistortions, // should not be null Distortions lensDistortions, // should not be null
boolean equalizeGreens, boolean equalizeGreens,
int threadsMax, int threadsMax,
...@@ -888,8 +888,8 @@ horizontal axis: ...@@ -888,8 +888,8 @@ horizontal axis:
} }
} }
/* /*
* Distortions.DistortionCalibrationData distortionCalibrationData= new * DistortionCalibrationData distortionCalibrationData= new
* Distortions.DistortionCalibrationData( imp_calibrated, //ImagePlus [] * DistortionCalibrationData( imp_calibrated, //ImagePlus []
* images, // images in the memory patternParameters, * images, // images in the memory patternParameters,
* //PatternParameters patternParameters, eyesisCameraParameters * //PatternParameters patternParameters, eyesisCameraParameters
* //EyesisCameraParameters eyesisCameraParameters ); * //EyesisCameraParameters eyesisCameraParameters );
...@@ -914,7 +914,7 @@ horizontal axis: ...@@ -914,7 +914,7 @@ horizontal axis:
// fitting strategy // fitting strategy
// distortionCalibrationData.pathName=this.goniometerParameters.initialCalibrationFile; // distortionCalibrationData.pathName=this.goniometerParameters.initialCalibrationFile;
lensDistortions.debugLevel = this.debugLevel; lensDistortions.debugLevel = this.debugLevel;
lensDistortions.fittingStrategy = new Distortions.FittingStrategy(true, lensDistortions.fittingStrategy = new FittingStrategy(true,
this.goniometerParameters.strategyFile, this.goniometerParameters.strategyFile,
distortionCalibrationData); // will use list of grid files distortionCalibrationData); // will use list of grid files
if (lensDistortions.fittingStrategy.pathName == null) { // failed to select/open the file if (lensDistortions.fittingStrategy.pathName == null) { // failed to select/open the file
......
This diff is collapsed.
This diff is collapsed.
...@@ -818,7 +818,7 @@ public class SFEPhases { ...@@ -818,7 +818,7 @@ public class SFEPhases {
// Ask for image selection (multiple directories), accumulate and create array of accumulated images // Ask for image selection (multiple directories), accumulate and create array of accumulated images
public ImagePlus[] getInteractiveAccumulatedImages( public ImagePlus[] getInteractiveAccumulatedImages(
Distortions.DistortionProcessConfiguration distortionProcessConfiguration, DistortionProcessConfiguration distortionProcessConfiguration,
final AtomicInteger stopRequested, final AtomicInteger stopRequested,
int threadsMax, int threadsMax,
boolean updateStatus, boolean updateStatus,
...@@ -1199,7 +1199,7 @@ public class SFEPhases { ...@@ -1199,7 +1199,7 @@ public class SFEPhases {
} }
public SensorDefects[] accummulateSensorDefects( public SensorDefects[] accummulateSensorDefects(
Distortions.DistortionProcessConfiguration distortionProcessConfiguration, DistortionProcessConfiguration distortionProcessConfiguration,
int tileClearSize, int tileClearSize,
int tileMargins, int tileMargins,
int cmask, // bitmask of color channels to process (9 - two greens) int cmask, // bitmask of color channels to process (9 - two greens)
......
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