Loading src/main/java/Eyesis_Correction.java +515 −487 Original line number Original line Diff line number Diff line Loading @@ -25,18 +25,16 @@ ** ** */ */ import ij.*; import java.awt.Button; import ij.process.*; import java.awt.Color; import ij.gui.*; import java.awt.Frame; import ij.io.FileInfo; import java.awt.GraphicsEnvironment; import ij.io.FileSaver; import java.awt.GridLayout; import ij.io.OpenDialog; import java.awt.Panel; import ij.io.Opener; import java.awt.Rectangle; import ij.plugin.frame.*; import java.awt.event.ActionEvent; import ij.plugin.PlugIn; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.*; import java.awt.event.*; import java.io.File; import java.io.File; import java.io.FileInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileNotFoundException; Loading @@ -54,6 +52,28 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.swing.JFileChooser; import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter; import ij.CompositeImage; import ij.IJ; import ij.ImageJ; import ij.ImagePlus; import ij.ImageStack; import ij.Macro; import ij.Prefs; import ij.WindowManager; import ij.gui.GUI; import ij.gui.GenericDialog; import ij.gui.Plot; import ij.gui.PlotWindow; import ij.gui.Roi; import ij.io.FileInfo; import ij.io.FileSaver; import ij.io.OpenDialog; import ij.io.Opener; import ij.plugin.PlugIn; import ij.plugin.frame.PlugInFrame; import ij.process.ColorProcessor; import ij.process.FloatProcessor; import ij.process.ImageProcessor; import loci.common.services.DependencyException; import loci.common.services.DependencyException; import loci.common.services.ServiceException; import loci.common.services.ServiceException; import loci.formats.FormatException; import loci.formats.FormatException; Loading Loading @@ -346,6 +366,7 @@ private Panel panel1, public String buttonLabel=""; public String buttonLabel=""; } } @Override public void run(String arg) { public void run(String arg) { String options=Macro.getOptions(); String options=Macro.getOptions(); try { try { Loading Loading @@ -378,7 +399,7 @@ private Panel panel1, Color color_conf_process= new Color(180, 240, 240); Color color_conf_process= new Color(180, 240, 240); Color color_restore= new Color(180, 240, 180); Color color_restore= new Color(180, 240, 180); Color color_stop= new Color(255, 160, 160); Color color_stop= new Color(255, 160, 160); <<<<<<< HEAD //<<<<<<< HEAD plugInFrame=new PlugInFrame("Eyesis_Correction") { plugInFrame=new PlugInFrame("Eyesis_Correction") { private static final long serialVersionUID = -4138832568507690332L; private static final long serialVersionUID = -4138832568507690332L; @Override @Override Loading @@ -389,11 +410,11 @@ private Panel panel1, } } } } }; }; instance=(Frame)plugInFrame; instance=plugInFrame; plugInFrame.addKeyListener(IJ.getInstance()); plugInFrame.addKeyListener(IJ.getInstance()); int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0); int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0); plugInFrame.setLayout(new GridLayout(menuRows, 1)); plugInFrame.setLayout(new GridLayout(menuRows, 1)); ======= /*======= instance = this; instance = this; Loading @@ -402,6 +423,7 @@ private Panel panel1, setLayout(new GridLayout(menuRows, 1)); setLayout(new GridLayout(menuRows, 1)); >>>>>>> origin/dct >>>>>>> origin/dct */ panel6 = new Panel(); panel6 = new Panel(); panel6.setLayout(new GridLayout(1, 0, 5, 5)); panel6.setLayout(new GridLayout(1, 0, 5, 5)); addButton("Save",panel6); addButton("Save",panel6); Loading Loading @@ -497,9 +519,9 @@ private Panel panel1, addButton("Plane Likely", panelPostProcessing3); addButton("Plane Likely", panelPostProcessing3); plugInFrame.add(panelPostProcessing3); plugInFrame.add(panelPostProcessing3); } } <<<<<<< HEAD // <<<<<<< HEAD plugInFrame.pack(); plugInFrame.pack(); ======= /* ======= if (DCT_MODE) { if (DCT_MODE) { panelDct1 = new Panel(); panelDct1 = new Panel(); panelDct1.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap panelDct1.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap Loading Loading @@ -534,7 +556,7 @@ private Panel panel1, } } pack(); pack(); >>>>>>> origin/dct >>>>>>> origin/dct */ GUI.center(plugInFrame); GUI.center(plugInFrame); plugInFrame.setVisible(true); plugInFrame.setVisible(true); FHT_INSTANCE= new DoubleFHT(); FHT_INSTANCE= new DoubleFHT(); Loading Loading @@ -647,6 +669,7 @@ private Panel panel1, b.addKeyListener(IJ.getInstance()); b.addKeyListener(IJ.getInstance()); panel.add(b); panel.add(b); } } @Override public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) { String label = e.getActionCommand(); String label = e.getActionCommand(); if (label.equals("Abort")) { if (label.equals("Abort")) { Loading Loading @@ -2612,7 +2635,7 @@ private Panel panel1, for (int ii = 0; ii<n; ii++) { for (int ii = 0; ii<n; ii++) { dindex[ii] = (double) ii; dindex[ii] = ii; x[ii] = 0.0; x[ii] = 0.0; } } // x[1] = 1.0; // x[1] = 1.0; Loading Loading @@ -4306,6 +4329,7 @@ private Panel panel1, public MultipleExtensionsFileFilter (String [] patterns) { public MultipleExtensionsFileFilter (String [] patterns) { this.patterns=patterns.clone(); this.patterns=patterns.clone(); } } @Override public boolean accept (File file) { public boolean accept (File file) { int i; int i; String name=file.getName(); String name=file.getName(); Loading @@ -4315,6 +4339,7 @@ private Panel panel1, } } return false; return false; } } @Override public String getDescription() { public String getDescription() { return description; return description; } } Loading Loading @@ -5613,6 +5638,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { float [] pixels=null; // will be initialized at first use float [] pixels=null; // will be initialized at first use float [] kernelPixels=null; // will be initialized at first use float [] kernelPixels=null; // will be initialized at first use Loading Loading @@ -5755,6 +5781,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { double [][] tile= new double[nChn][debayerParameters.size * debayerParameters.size ]; double [][] tile= new double[nChn][debayerParameters.size * debayerParameters.size ]; double [][] both_masks; double [][] both_masks; Loading Loading @@ -6002,6 +6029,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { double [] tile= new double[size * size ]; double [] tile= new double[size * size ]; int tileY,tileX; int tileY,tileX; Loading Loading
src/main/java/Eyesis_Correction.java +515 −487 Original line number Original line Diff line number Diff line Loading @@ -25,18 +25,16 @@ ** ** */ */ import ij.*; import java.awt.Button; import ij.process.*; import java.awt.Color; import ij.gui.*; import java.awt.Frame; import ij.io.FileInfo; import java.awt.GraphicsEnvironment; import ij.io.FileSaver; import java.awt.GridLayout; import ij.io.OpenDialog; import java.awt.Panel; import ij.io.Opener; import java.awt.Rectangle; import ij.plugin.frame.*; import java.awt.event.ActionEvent; import ij.plugin.PlugIn; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.*; import java.awt.event.*; import java.io.File; import java.io.File; import java.io.FileInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileNotFoundException; Loading @@ -54,6 +52,28 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.swing.JFileChooser; import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter; import ij.CompositeImage; import ij.IJ; import ij.ImageJ; import ij.ImagePlus; import ij.ImageStack; import ij.Macro; import ij.Prefs; import ij.WindowManager; import ij.gui.GUI; import ij.gui.GenericDialog; import ij.gui.Plot; import ij.gui.PlotWindow; import ij.gui.Roi; import ij.io.FileInfo; import ij.io.FileSaver; import ij.io.OpenDialog; import ij.io.Opener; import ij.plugin.PlugIn; import ij.plugin.frame.PlugInFrame; import ij.process.ColorProcessor; import ij.process.FloatProcessor; import ij.process.ImageProcessor; import loci.common.services.DependencyException; import loci.common.services.DependencyException; import loci.common.services.ServiceException; import loci.common.services.ServiceException; import loci.formats.FormatException; import loci.formats.FormatException; Loading Loading @@ -346,6 +366,7 @@ private Panel panel1, public String buttonLabel=""; public String buttonLabel=""; } } @Override public void run(String arg) { public void run(String arg) { String options=Macro.getOptions(); String options=Macro.getOptions(); try { try { Loading Loading @@ -378,7 +399,7 @@ private Panel panel1, Color color_conf_process= new Color(180, 240, 240); Color color_conf_process= new Color(180, 240, 240); Color color_restore= new Color(180, 240, 180); Color color_restore= new Color(180, 240, 180); Color color_stop= new Color(255, 160, 160); Color color_stop= new Color(255, 160, 160); <<<<<<< HEAD //<<<<<<< HEAD plugInFrame=new PlugInFrame("Eyesis_Correction") { plugInFrame=new PlugInFrame("Eyesis_Correction") { private static final long serialVersionUID = -4138832568507690332L; private static final long serialVersionUID = -4138832568507690332L; @Override @Override Loading @@ -389,11 +410,11 @@ private Panel panel1, } } } } }; }; instance=(Frame)plugInFrame; instance=plugInFrame; plugInFrame.addKeyListener(IJ.getInstance()); plugInFrame.addKeyListener(IJ.getInstance()); int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0); int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0); plugInFrame.setLayout(new GridLayout(menuRows, 1)); plugInFrame.setLayout(new GridLayout(menuRows, 1)); ======= /*======= instance = this; instance = this; Loading @@ -402,6 +423,7 @@ private Panel panel1, setLayout(new GridLayout(menuRows, 1)); setLayout(new GridLayout(menuRows, 1)); >>>>>>> origin/dct >>>>>>> origin/dct */ panel6 = new Panel(); panel6 = new Panel(); panel6.setLayout(new GridLayout(1, 0, 5, 5)); panel6.setLayout(new GridLayout(1, 0, 5, 5)); addButton("Save",panel6); addButton("Save",panel6); Loading Loading @@ -497,9 +519,9 @@ private Panel panel1, addButton("Plane Likely", panelPostProcessing3); addButton("Plane Likely", panelPostProcessing3); plugInFrame.add(panelPostProcessing3); plugInFrame.add(panelPostProcessing3); } } <<<<<<< HEAD // <<<<<<< HEAD plugInFrame.pack(); plugInFrame.pack(); ======= /* ======= if (DCT_MODE) { if (DCT_MODE) { panelDct1 = new Panel(); panelDct1 = new Panel(); panelDct1.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap panelDct1.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap Loading Loading @@ -534,7 +556,7 @@ private Panel panel1, } } pack(); pack(); >>>>>>> origin/dct >>>>>>> origin/dct */ GUI.center(plugInFrame); GUI.center(plugInFrame); plugInFrame.setVisible(true); plugInFrame.setVisible(true); FHT_INSTANCE= new DoubleFHT(); FHT_INSTANCE= new DoubleFHT(); Loading Loading @@ -647,6 +669,7 @@ private Panel panel1, b.addKeyListener(IJ.getInstance()); b.addKeyListener(IJ.getInstance()); panel.add(b); panel.add(b); } } @Override public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) { String label = e.getActionCommand(); String label = e.getActionCommand(); if (label.equals("Abort")) { if (label.equals("Abort")) { Loading Loading @@ -2612,7 +2635,7 @@ private Panel panel1, for (int ii = 0; ii<n; ii++) { for (int ii = 0; ii<n; ii++) { dindex[ii] = (double) ii; dindex[ii] = ii; x[ii] = 0.0; x[ii] = 0.0; } } // x[1] = 1.0; // x[1] = 1.0; Loading Loading @@ -4306,6 +4329,7 @@ private Panel panel1, public MultipleExtensionsFileFilter (String [] patterns) { public MultipleExtensionsFileFilter (String [] patterns) { this.patterns=patterns.clone(); this.patterns=patterns.clone(); } } @Override public boolean accept (File file) { public boolean accept (File file) { int i; int i; String name=file.getName(); String name=file.getName(); Loading @@ -4315,6 +4339,7 @@ private Panel panel1, } } return false; return false; } } @Override public String getDescription() { public String getDescription() { return description; return description; } } Loading Loading @@ -5613,6 +5638,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { float [] pixels=null; // will be initialized at first use float [] pixels=null; // will be initialized at first use float [] kernelPixels=null; // will be initialized at first use float [] kernelPixels=null; // will be initialized at first use Loading Loading @@ -5755,6 +5781,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { double [][] tile= new double[nChn][debayerParameters.size * debayerParameters.size ]; double [][] tile= new double[nChn][debayerParameters.size * debayerParameters.size ]; double [][] both_masks; double [][] both_masks; Loading Loading @@ -6002,6 +6029,7 @@ private Panel panel1, final long startTime = System.nanoTime(); final long startTime = System.nanoTime(); for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { threads[ithread] = new Thread() { @Override public void run() { public void run() { double [] tile= new double[size * size ]; double [] tile= new double[size * size ]; int tileY,tileX; int tileY,tileX; Loading