Commit 973a1bdd authored by Andrey Filippov's avatar Andrey Filippov

And more refactoring

parent 73ae347c
......@@ -60,32 +60,26 @@ import java.util.regex.Pattern;
// TODO: modify methods that depend on it, use class CalibrationFileManagement
import javax.swing.JFileChooser;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.CamerasInterface;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.FocusingMotors;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.GoniometerMotors;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.LaserPointers;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.PowerControl;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.UVLEDandLasers;
import com.elphel.imagej.calibration.Distortions.RefineParameters;
import com.elphel.imagej.calibration.SimulationPattern.SimulParameters;
import com.elphel.imagej.common.DoubleFHT;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.CalibrationHardwareInterface;
import com.elphel.imagej.dp.DistortionCalibrationData;
import com.elphel.imagej.dp.DistortionProcessConfiguration;
import com.elphel.imagej.dp.Distortions;
import com.elphel.imagej.dp.EyesisCameraParameters;
import com.elphel.imagej.dp.LensDistortionParameters;
import com.elphel.imagej.dp.PolynomialApproximation;
import com.elphel.imagej.dp.SFEPhases;
import com.elphel.imagej.dp.SimulationPattern;
import com.elphel.imagej.dp.WavePatternGenerator;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.dp.CalibrationHardwareInterface.CamerasInterface;
import com.elphel.imagej.dp.CalibrationHardwareInterface.FocusingMotors;
import com.elphel.imagej.dp.CalibrationHardwareInterface.GoniometerMotors;
import com.elphel.imagej.dp.CalibrationHardwareInterface.LaserPointers;
import com.elphel.imagej.dp.CalibrationHardwareInterface.PowerControl;
import com.elphel.imagej.dp.CalibrationHardwareInterface.UVLEDandLasers;
import com.elphel.imagej.dp.Distortions.RefineParameters;
import com.elphel.imagej.dp.SFEPhases.Defect;
import com.elphel.imagej.dp.SFEPhases.SensorDefects;
import com.elphel.imagej.dp.SimulationPattern.SimulParameters;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.Matrix; // Download here: http://math.nist.gov/javanumerics/jama/
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/**
**
** CalibrationHardwareInterface.jave - hardware-related part (cameras, focusing motors,
......@@ -70,9 +70,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import com.elphel.imagej.calibration.FocusingField;
import com.elphel.imagej.calibration.LensAdjustment;
import com.elphel.imagej.calibration.MatchSimulatedPattern;
import com.elphel.imagej.dp.PolynomialApproximation;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.LUDecomposition;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/*
**
** DistortionCalibrationData.java
......@@ -35,11 +35,12 @@ import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.XMLConfiguration;
import com.elphel.imagej.calibration.EyesisAberrations;
import com.elphel.imagej.calibration.MatchSimulatedPattern;
import com.elphel.imagej.calibration.PatternParameters;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.EyesisCameraParameters;
import com.elphel.imagej.dp.EyesisSubCameraParameters;
import com.elphel.imagej.dp.PolynomialApproximation;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import ij.IJ;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/*
**
** DistortionProcessConfiguration.java
......@@ -30,6 +30,8 @@ import ij.gui.GenericDialog;
import java.io.File;
import java.util.Properties;
import com.elphel.imagej.dp.WindowTools;
public class DistortionProcessConfiguration{
public String sourceDirectory="";
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/*
**
** Distortions.java - Calculate lens distortion parameters from the pattern image
......@@ -35,11 +35,13 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.FittingStrategy;
import com.elphel.imagej.calibration.MatchSimulatedPattern;
import com.elphel.imagej.calibration.PatternParameters;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.EyesisCameraParameters;
import com.elphel.imagej.dp.EyesisSubCameraParameters;
import com.elphel.imagej.dp.LensDistortionParameters;
import com.elphel.imagej.dp.PolynomialApproximation;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.LUDecomposition;
......
......@@ -19,16 +19,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.calibration.SimulationPattern.SimulParameters;
import com.elphel.imagej.common.DoubleFHT;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.DistortionCalibrationData;
import com.elphel.imagej.dp.Distortions;
import com.elphel.imagej.dp.SimulationPattern;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.dp.SimulationPattern.SimulParameters;
import com.elphel.imagej.jp4.JP46_Reader_camera;
public class EyesisAberrations {
......
......@@ -37,10 +37,8 @@ import java.util.Set;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.DistortionCalibrationData;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
import ij.IJ;
import ij.gui.GenericDialog;
......
......@@ -43,10 +43,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
//import Distortions.LMAArrays; // may still reuse?
import Jama.LUDecomposition;
......
......@@ -29,17 +29,12 @@ package com.elphel.imagej.calibration;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.CamerasInterface;
import com.elphel.imagej.calibration.CalibrationHardwareInterface.GoniometerMotors;
import com.elphel.imagej.calibration.SimulationPattern.SimulParameters;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.CalibrationHardwareInterface;
import com.elphel.imagej.dp.DistortionCalibrationData;
import com.elphel.imagej.dp.DistortionProcessConfiguration;
import com.elphel.imagej.dp.Distortions;
import com.elphel.imagej.dp.EyesisCameraParameters;
import com.elphel.imagej.dp.SimulationPattern;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.CalibrationHardwareInterface.CamerasInterface;
import com.elphel.imagej.dp.CalibrationHardwareInterface.GoniometerMotors;
import com.elphel.imagej.dp.SimulationPattern.SimulParameters;
import ij.IJ;
import ij.ImagePlus;
......
......@@ -25,10 +25,9 @@ package com.elphel.imagej.calibration;
import java.awt.Rectangle;
import java.util.Properties;
import com.elphel.imagej.calibration.SimulationPattern.SimulParameters;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.SimulationPattern;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.SimulationPattern.SimulParameters;
import ij.IJ;
import ij.ImagePlus;
......
......@@ -36,13 +36,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.SimulationPattern.SimulParameters;
import com.elphel.imagej.common.DoubleFHT;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.PolynomialApproximation;
import com.elphel.imagej.dp.SimulationPattern;
import com.elphel.imagej.dp.WindowTools;
import com.elphel.imagej.dp.SimulationPattern.SimulParameters;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.LUDecomposition;
......
......@@ -32,8 +32,7 @@ import ij.io.Opener;
import java.awt.Rectangle;
import java.util.Properties;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.jp4.JP46_Reader_camera;
/* gridGeometry:
* [v][u][0] - x(mm) of the node(u,v), right (looking to the wall) - positive
......
......@@ -38,12 +38,11 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.common.DoubleFHT;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.dp.CalibrationFileManagement;
import com.elphel.imagej.dp.EyesisTiff;
import com.elphel.imagej.dp.CalibrationFileManagement.MultipleExtensionsFileFilter;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import Jama.Matrix;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
import java.awt.Rectangle;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.MatchSimulatedPattern;
import com.elphel.imagej.common.DoubleGaussianBlur;
import com.elphel.imagej.common.ShowDoubleFloatArrays;
......
package com.elphel.imagej.dp;
package com.elphel.imagej.calibration;
/**
** -----------------------------------------------------------------------------**
** target_points.java
......@@ -38,7 +38,6 @@ import ij.plugin.frame.*;
import java.util.List;
import com.elphel.imagej.calibration.Aberration_Calibration;
import com.elphel.imagej.jp4.JP46_Reader_camera;
import java.util.ArrayList;
......
......@@ -1152,7 +1152,7 @@ import ij.gui.GenericDialog;
EyesisSubCameraParameters subCam=this.eyesisSubCameras[stationNumber][subCamNumber];
return subCam.lensDistortionModel;
}
boolean getEnableNoLaser(int stationNumber,int subCamNumber){
public boolean getEnableNoLaser(int stationNumber,int subCamNumber){
if (
(this.eyesisSubCameras==null) ||
(this.numStations<=stationNumber) ||
......
......@@ -34,6 +34,7 @@ import java.util.HashMap;
import java.util.Properties;
import java.util.Set;
import com.elphel.imagej.calibration.CalibrationFileManagement;
import com.elphel.imagej.common.GenericJTabbedDialog;
import ij.IJ;
......
......@@ -71,6 +71,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;
import com.elphel.imagej.calibration.CalibrationFileManagement;
import com.elphel.imagej.calibration.DeBayerScissors;
import com.elphel.imagej.calibration.PixelMapping;
import com.elphel.imagej.common.DoubleFHT;
......
......@@ -35,6 +35,7 @@ import java.io.File;
import java.util.Properties;
//import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.calibration.CalibrationFileManagement;
import com.elphel.imagej.calibration.PixelMapping;
import com.elphel.imagej.common.DoubleFHT;
import com.elphel.imagej.common.DoubleGaussianBlur;
......
......@@ -43,6 +43,8 @@ import ij.process.ImageProcessor;
import javax.swing.SwingUtilities;
import com.elphel.imagej.calibration.CalibrationFileManagement;
import com.elphel.imagej.calibration.DistortionProcessConfiguration;
import com.elphel.imagej.calibration.EyesisAberrations;
import com.elphel.imagej.calibration.MatchSimulatedPattern;
import com.elphel.imagej.common.DoubleGaussianBlur;
......
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