Page MenuHomec4science

No OneTemporary

File Metadata

Created
Sat, May 4, 10:28
diff --git a/DeconvolutionLab2/src/deconvolution/capsule/ResourcesCapsule.java b/DeconvolutionLab2/src/deconvolution/capsule/ResourcesCapsule.java
new file mode 100644
index 0000000..ef6e0a4
--- /dev/null
+++ b/DeconvolutionLab2/src/deconvolution/capsule/ResourcesCapsule.java
@@ -0,0 +1,164 @@
+/*
+ * DeconvolutionLab2
+ *
+ * Conditions of use: You are free to use this software for research or
+ * educational purposes. In addition, we expect you to include adequate
+ * citations and acknowledgments whenever you present or publish results that
+ * are based on it.
+ *
+ * Reference: DeconvolutionLab2: An Open-Source Software for Deconvolution
+ * Microscopy D. Sage, L. Donati, F. Soulez, D. Fortun, G. Schmit, A. Seitz,
+ * R. Guiet, C. Vonesch, M Unser, Methods of Elsevier, 2017.
+ */
+
+/*
+ * Copyright 2010-2017 Biomedical Imaging Group at the EPFL.
+ *
+ * This file is part of DeconvolutionLab2 (DL2).
+ *
+ * DL2 is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * DL2 is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * DL2. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package deconvolution.capsule;
+
+import java.awt.CardLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+
+import bilib.table.CustomizedTable;
+import deconvolution.Deconvolution;
+import deconvolutionlab.system.AbstractMeter;
+import deconvolutionlab.system.FFTMeter;
+import deconvolutionlab.system.FileMeter;
+import deconvolutionlab.system.JavaMeter;
+import deconvolutionlab.system.MemoryMeter;
+import deconvolutionlab.system.ProcessorMeter;
+import deconvolutionlab.system.SignalMeter;
+import fft.FFTPanel;
+
+/**
+ * This class is a information module about the resources of the machine
+ * (memory, processor, allocated signals).
+ *
+ * @author Daniel Sage
+ *
+ */
+public class ResourcesCapsule extends AbstractCapsule implements ActionListener {
+
+ private ArrayList<AbstractMeter> meters;
+ private JPanel cards;
+
+ private MemoryMeter memory;
+ private ProcessorMeter processor;
+ private SignalMeter signal;
+ private FFTMeter fft;
+ private JavaMeter java;
+ private FileMeter file;
+
+ private JPanel buttons;
+
+ private JButton bnMemory;
+ private JButton bnProcessor;
+ private JButton bnSignal;
+ private JButton bnFFT;
+ private JButton bnJava;
+ private JButton bnFile;
+
+ public ResourcesCapsule(Deconvolution deconvolution) {
+ super(deconvolution);
+ bnMemory = new JButton("Memory");
+ bnProcessor = new JButton("Processor");
+ bnSignal = new JButton("Signal");
+ bnFFT = new JButton("FFT");
+ bnJava = new JButton("Java");
+ bnFile = new JButton("File");
+
+ buttons = new JPanel(new GridLayout(6, 1));
+ buttons.add(bnMemory);
+ buttons.add(bnProcessor);
+ buttons.add(bnSignal);
+ buttons.add(bnFFT);
+ buttons.add(bnJava);
+ buttons.add(bnFile);
+
+ int width = 100;
+ memory = new MemoryMeter(width / 3);
+ processor = new ProcessorMeter(width / 3);
+ signal = new SignalMeter(width / 3);
+ fft = new FFTMeter(width / 3);
+ java = new JavaMeter(width / 3);
+ file = new FileMeter(width / 3);
+
+ meters = new ArrayList<AbstractMeter>();
+ meters.add(processor);
+ meters.add(memory);
+ meters.add(signal);
+ meters.add(fft);
+ meters.add(java);
+ meters.add(file);
+
+ cards = new JPanel(new CardLayout());
+ cards.add(memory.getMeterName(), memory.getPanel(400, 200));
+ cards.add(processor.getMeterName(), processor.getPanel(400, 200));
+ cards.add(signal.getMeterName(), file.getPanel(400, 200));
+ cards.add(fft.getMeterName(), new FFTPanel(400, 200));
+ cards.add(java.getMeterName(), java.getPanel(400, 200));
+ cards.add(file.getMeterName(), file.getPanel(400, 200));
+
+ bnFile.addActionListener(this);
+ bnFFT.addActionListener(this);
+ bnJava.addActionListener(this);
+ bnSignal.addActionListener(this);
+ bnProcessor.addActionListener(this);
+ bnMemory.addActionListener(this);
+
+ split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, buttons, cards);
+ split.setDividerLocation(0.2);
+ }
+
+ @Override
+ public void update() {
+ }
+
+ @Override
+ public String getID() {
+ return "Resources";
+ }
+
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if (e.getSource() == bnJava)
+ ((CardLayout) (cards.getLayout())).show(cards, java.getMeterName());
+ if (e.getSource() == bnMemory)
+ ((CardLayout) (cards.getLayout())).show(cards, memory.getMeterName());
+ if (e.getSource() == bnProcessor)
+ ((CardLayout) (cards.getLayout())).show(cards, processor.getMeterName());
+ if (e.getSource() == bnFFT)
+ ((CardLayout) (cards.getLayout())).show(cards, fft.getMeterName());
+ if (e.getSource() == bnSignal)
+ ((CardLayout) (cards.getLayout())).show(cards, signal.getMeterName());
+ if (e.getSource() == bnFile)
+ ((CardLayout) (cards.getLayout())).show(cards, file.getMeterName());
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/DeconvolutionLab2/src/deconvolutionlab/system/RuntimeInfoPanel.java b/DeconvolutionLab2/src/deconvolutionlab/system/RuntimeInfoPanel.java
new file mode 100644
index 0000000..bd73bb6
--- /dev/null
+++ b/DeconvolutionLab2/src/deconvolutionlab/system/RuntimeInfoPanel.java
@@ -0,0 +1,114 @@
+/*
+ * DeconvolutionLab2
+ *
+ * Conditions of use: You are free to use this software for research or
+ * educational purposes. In addition, we expect you to include adequate
+ * citations and acknowledgments whenever you present or publish results that
+ * are based on it.
+ *
+ * Reference: DeconvolutionLab2: An Open-Source Software for Deconvolution
+ * Microscopy D. Sage, L. Donati, F. Soulez, D. Fortun, G. Schmit, A. Seitz,
+ * R. Guiet, C. Vonesch, M Unser, Methods of Elsevier, 2017.
+ */
+
+/*
+ * Copyright 2010-2017 Biomedical Imaging Group at the EPFL.
+ *
+ * This file is part of DeconvolutionLab2 (DL2).
+ *
+ * DL2 is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * DL2 is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * DL2. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package deconvolutionlab.system;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+
+import deconvolutionlab.Config;
+import deconvolutionlab.Constants;
+
+public class RuntimeInfoPanel extends JPanel {
+
+ private Timer timer = new Timer();
+ private TimerTask updater = new Updater();
+ private MemoryMeter memory;
+ private ProcessorMeter processor;
+ private int width = Constants.widthGUI;
+ private ArrayList<AbstractMeter> meters = new ArrayList<AbstractMeter>();
+ private long rate = 0;
+
+
+ public RuntimeInfoPanel(long rate) {
+
+ this.rate = rate;
+ memory = new MemoryMeter(100);
+ processor = new ProcessorMeter(100);
+
+ meters.add(memory);
+ meters.add(processor);
+
+ JPanel meters = new JPanel(new GridLayout(1, 3));
+ meters.add(memory);
+ meters.add(processor);
+ restart();
+
+ // Panel Compact
+ JPanel pnCompact = new JPanel();
+ pnCompact.setPreferredSize(new Dimension(width, 20));
+
+ JPanel top = new JPanel(new BorderLayout());
+ top.add(meters, BorderLayout.CENTER);
+
+ JPanel panel = new JPanel(new BorderLayout());
+ panel.add(top, BorderLayout.NORTH);
+
+ add(panel);
+ setMinimumSize(new Dimension(width, 70));
+ Rectangle rect = Config.getDialog("System.Frame");
+ if (rect.x > 0 && rect.y > 0)
+ setLocation(rect.x, rect.y);
+
+ this.setBorder(BorderFactory.createEmptyBorder());
+ }
+
+ public void update() {
+ processor.update();
+ memory.update();
+ }
+
+ public void restart() {
+ long refreshTime = rate;
+
+ if (updater != null) {
+ updater.cancel();
+ updater = null;
+ }
+ updater = new Updater();
+ timer.schedule(updater, 0, refreshTime);
+ }
+
+ private class Updater extends TimerTask {
+ @Override
+ public void run() {
+ update();
+ }
+ }
+}
diff --git a/DeconvolutionLab2DeconvolutionLab2.config b/DeconvolutionLab2DeconvolutionLab2.config
new file mode 100644
index 0000000..fa23a7b
--- /dev/null
+++ b/DeconvolutionLab2DeconvolutionLab2.config
@@ -0,0 +1,66 @@
+#DeconvolutionLab2
+#DeconvolutionLab2
+#Sun Dec 10 12:36:25 CET 2017
+Algorithm.BVLS.iterations=10
+Algorithm.BVLS.step=1.0
+Algorithm.FISTA.iterations=10
+Algorithm.FISTA.reg=0.1
+Algorithm.FISTA.scale=3
+Algorithm.FISTA.step=1.0
+Algorithm.FISTA.wavelets=Haar
+Algorithm.ICTM.iterations=10
+Algorithm.ICTM.reg=0.1
+Algorithm.ICTM.step=1.0
+Algorithm.ISTA.iterations=10
+Algorithm.ISTA.reg=0.1
+Algorithm.ISTA.scale=3
+Algorithm.ISTA.step=1.0
+Algorithm.ISTA.wavelets=Haar
+Algorithm.LW.iterations=10
+Algorithm.LW.step=1.0
+Algorithm.NNLS.iterations=10
+Algorithm.NNLS.step=1.0
+Algorithm.RIF.reg=0.1
+Algorithm.RL.iterations=10
+Algorithm.RLTV.reg=0.1
+Algorithm.SIM.gaussian.mean=0.0
+Algorithm.SIM.gaussian.stdev=1.0
+Algorithm.SIM.poisson=0.0
+Algorithm.TM.iterations=10
+Algorithm.TM.reg=0.1
+Algorithm.TM.step=1.0
+Algorithm.TRIF.reg=0.1
+Algorithm.VC.iterations=10
+Algorithm.VC.step=1.0
+Algorithm.algorithm=Regularized Inverse Filter
+Controller.constraint=no
+Controller.monitor=console table
+Controller.reference.enable=false
+Controller.reference.value=
+Controller.residu.enable=false
+Controller.residu.value=0.01
+Controller.stats=no
+Controller.time.enable=false
+Controller.time.value=3600
+Controller.verbose=log
+DeconvolutionLab.MainDialog.location.h=490
+DeconvolutionLab.MainDialog.location.w=562
+DeconvolutionLab.MainDialog.location.x=0
+DeconvolutionLab.MainDialog.location.y=23
+Language.headless=Run (Headless)
+Language.job=Job
+Language.language=Command line
+Output.display=true
+Path.current=current
+Path.path=/Users/sage/git/deconvolution/DeconvolutionLab2
+Preprocessing.apoxy=Uniform
+Preprocessing.apoz=Uniform
+Preprocessing.extxy=0
+Preprocessing.extz=0
+Preprocessing.normalization=1
+Preprocessing.padxy=None
+Preprocessing.padz=None
+Resources.epsilon=1E-6
+Resources.fft=Fastest
+Resources.multithreading=yes
+Resources.system=yes

Event Timeline