Commit 3cb7b435 authored by Andrey Filippov's avatar Andrey Filippov

debugging illustrations

parent 7c9b8ed9
...@@ -667,7 +667,9 @@ public static MatchSimulatedPattern.DistortionParameters DISTORTION =new MatchSi ...@@ -667,7 +667,9 @@ public static MatchSimulatedPattern.DistortionParameters DISTORTION =new MatchSi
public static Goniometer GONIOMETER=null; public static Goniometer GONIOMETER=null;
public static LwirReaderParameters LWIR_PARAMETERS = new LwirReaderParameters(); public static LwirReaderParameters LWIR_PARAMETERS = new LwirReaderParameters();
public static CalibrationIllustrationParameters CALIBRATION_ILLUSTRATION_PARAMETERS = new CalibrationIllustrationParameters(LWIR_PARAMETERS); public static CalibrationIllustrationParameters CALIBRATION_ILLUSTRATION_PARAMETERS = new CalibrationIllustrationParameters(
LWIR_PARAMETERS,
EYESIS_CAMERA_PARAMETERS);
// new CalibrationHardwareInterface.LaserPointers(); // new CalibrationHardwareInterface.LaserPointers();
public class SyncCommand{ public class SyncCommand{
public boolean isRunning= false; public boolean isRunning= false;
...@@ -1069,6 +1071,7 @@ if (MORE_BUTTONS) { ...@@ -1069,6 +1071,7 @@ if (MORE_BUTTONS) {
panelIllustrations.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap panelIllustrations.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
addButton("Illustrations Configure", panelIllustrations,color_configure); addButton("Illustrations Configure", panelIllustrations,color_configure);
addButton("Illustrations", panelIllustrations,color_bundle); addButton("Illustrations", panelIllustrations,color_bundle);
addButton("Remove Bad grids", panelIllustrations,color_stop);
add(panelIllustrations); add(panelIllustrations);
...@@ -9434,20 +9437,27 @@ if (MORE_BUTTONS) { ...@@ -9434,20 +9437,27 @@ if (MORE_BUTTONS) {
LENS_DISTORTIONS, // Distortions distortions, LENS_DISTORTIONS, // Distortions distortions,
SYNC_COMMAND.stopRequested, // AtomicInteger stopRequested, SYNC_COMMAND.stopRequested, // AtomicInteger stopRequested,
MASTER_DEBUG_LEVEL); // int debug_level); MASTER_DEBUG_LEVEL); // int debug_level);
/* }
CALIBRATION_ILLUSTRATION.convertSourceFiles();
return;
}
/* ======================================================================== */
if (label.equals("Remove Bad grids")) {
if (LENS_DISTORTIONS==null) {
IJ.showMessage("LENS_DISTORTION is not set"); // to use all grids imported
return;
}
EYESIS_ABERRATIONS.setDistortions(LENS_DISTORTIONS);
if (CALIBRATION_ILLUSTRATION == null) {
CALIBRATION_ILLUSTRATION = new CalibrationIllustration( CALIBRATION_ILLUSTRATION = new CalibrationIllustration(
LWIR_PARAMETERS, // LwirReaderParameters lwirReaderParameters, CALIBRATION_ILLUSTRATION_PARAMETERS, // CalibrationIllustrationParameters illustrationParameters,
LENS_DISTORTION_PARAMETERS, // LensDistortionParameters lensDistortionParameters, EYESIS_ABERRATIONS, // EyesisAberrations eyesisAberrations,
PATTERN_PARAMETERS, // PatternParameters patternParameters, LENS_DISTORTIONS, // Distortions distortions,
REFINE_PARAMETERS, // RefineParameters refineParameters,
DISTORTION_PROCESS_CONFIGURATION, // DistortionProcessConfiguration distortionProcessConfiguration,
EYESIS_CAMERA_PARAMETERS, // EyesisCameraParameters eyesisCameraParameters,
SYNC_COMMAND.stopRequested, // AtomicInteger stopRequested, SYNC_COMMAND.stopRequested, // AtomicInteger stopRequested,
MASTER_DEBUG_LEVEL); // int debug_level); MASTER_DEBUG_LEVEL); // int debug_level);
*/
} }
// CALIBRATION_ILLUSTRATION.selectUsefulGrids(); CALIBRATION_ILLUSTRATION.removeBadGrids();
CALIBRATION_ILLUSTRATION.convertSourceFiles();
return; return;
} }
...@@ -748,7 +748,7 @@ public class LwirReader { ...@@ -748,7 +748,7 @@ public class LwirReader {
* From Stephan Preibisch's Multithreading.java class. See: * From Stephan Preibisch's Multithreading.java class. See:
* http://repo.or.cz/w/trakem2.git?a=blob;f=mpi/fruitfly/general/MultiThreading.java;hb=HEAD * http://repo.or.cz/w/trakem2.git?a=blob;f=mpi/fruitfly/general/MultiThreading.java;hb=HEAD
*/ */
private Thread[] newThreadArray(int maxCPUs) { private static Thread[] newThreadArray(int maxCPUs) {
int n_cpus = Runtime.getRuntime().availableProcessors(); int n_cpus = Runtime.getRuntime().availableProcessors();
if (n_cpus>maxCPUs)n_cpus=maxCPUs; if (n_cpus>maxCPUs)n_cpus=maxCPUs;
return new Thread[n_cpus]; return new Thread[n_cpus];
......
...@@ -111,7 +111,7 @@ public class LwirReaderParameters { ...@@ -111,7 +111,7 @@ public class LwirReaderParameters {
return absolute_chn; return absolute_chn;
} }
public int [] getAbsoluteEoChannels(boolean absolote) { public int [] getEoChannels(boolean absolote) {
int [] absolute_chn = new int [eo_channels.length]; int [] absolute_chn = new int [eo_channels.length];
for (int i = 0; i < absolute_chn.length; i++) { for (int i = 0; i < absolute_chn.length; i++) {
absolute_chn[i] = eo_channels[i] + + (absolote? getEoChn0():0); absolute_chn[i] = eo_channels[i] + + (absolote? getEoChn0():0);
......
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