Commit 9cea87bd authored by Guillaume's avatar Guillaume

Merge branch 'hotfix-0.7.2'

parents 4f199f26 3551bd63
......@@ -4,12 +4,12 @@
<parent>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-essentials</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</parent>
<artifactId>pickcells-container</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
<packaging>jar</packaging>
<name>pickcells-container</name>
......
......@@ -4,12 +4,12 @@
<parent>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-essentials</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</parent>
<artifactId>pickcells-coremodules</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
<packaging>jar</packaging>
<name>pickcells-coremodules</name>
......
......@@ -25,10 +25,8 @@ package org.pickcellslab.pickcells.spots;
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.IOException;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import java.util.logging.Level;
import javax.swing.GroupLayout;
......@@ -37,12 +35,13 @@ import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.SpinnerNumberModel;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
......@@ -50,7 +49,6 @@ import org.apache.log4j.Logger;
import org.pickcellslab.foundationj.datamodel.DataTypes;
import org.pickcellslab.foundationj.ui.renderers.ClassOrLinkRenderer;
import org.pickcellslab.pickcells.api.app.ui.UI;
import org.pickcellslab.pickcells.api.datamodel.conventions.DataModel;
import org.pickcellslab.pickcells.api.datamodel.types.Image;
import org.pickcellslab.pickcells.api.datamodel.types.ImageDot;
import org.pickcellslab.pickcells.api.img.detector.DogDetect;
......@@ -74,9 +72,6 @@ public class SpotDetectorDialog<T extends RealType<T> & NativeType<T>> extends J
private static Logger log = Logger.getLogger(SpotDetectorDialog.class);
private JFormattedTextField radiusField;
private JFormattedTextField sigmaField;
private JFormattedTextField threshField;
private JComboBox<String> channelBox;
private JComboBox<Class<?>> typeBox;
......@@ -218,50 +213,27 @@ public class SpotDetectorDialog<T extends RealType<T> & NativeType<T>> extends J
JLabel label = new JLabel("Type");
label.setToolTipText("The Type of object which should be associated with the spots");
channelBox = new JComboBox<>(c);
channelBox.addItemListener(e->{
//TODO
});
JLabel lblMinScale = new JLabel("Radius");
lblMinScale.setToolTipText("Radius of the structures to detect in pixel coordinates");
NumberFormat f = NumberFormat.getNumberInstance(Locale.ENGLISH);
radiusField = new JFormattedTextField(f);
radiusField.setText("1");
radiusField.setColumns(10);
radiusField.addPropertyChangeListener(e-> {
radius = Double.parseDouble(radiusField.getText());
});
final SpinnerNumberModel radiusModel = new SpinnerNumberModel(radius, 0.01, 500, 0.1);
final JSpinner radiusField = new JSpinner(radiusModel);
radiusField.addChangeListener(e -> radius = radiusModel.getNumber().doubleValue());
JLabel lblMaxScale = new JLabel("Sigma");
lblMaxScale.setToolTipText("Estimated Sigma of the image in pixel coordinate");
sigmaField = new JFormattedTextField(f);
sigmaField.setText(""+sigma);
sigmaField.setColumns(10);
sigmaField.addPropertyChangeListener(e-> {
try {
sigma = f.parse(sigmaField.getText()).doubleValue();
} catch (Exception e1) {
JOptionPane.showMessageDialog(null,"Unable to parse "+sigmaField.getText());
}
});
final SpinnerNumberModel sigmaModel = new SpinnerNumberModel(sigma, 0.01, 10, 0.01);
final JSpinner sigmaField = new JSpinner(sigmaModel);
sigmaField.addChangeListener(e -> sigma = sigmaModel.getNumber().doubleValue());
JLabel lblThreshold = new JLabel("min intensity");
lblThreshold.setToolTipText("Threshold below which maxima will be ignored");
threshField = new JFormattedTextField(f);
threshField.setText(""+threshold);
threshField.setColumns(10);
threshField.addPropertyChangeListener(e-> {
try {
threshold = f.parse(threshField.getText()).doubleValue();
} catch (Exception e1) {
JOptionPane.showMessageDialog(null,"Unable to parse "+threshField.getText());
}
});
final SpinnerNumberModel threshModel = new SpinnerNumberModel(threshold, 0, 65000, 1);
final JSpinner threshField = new JSpinner(threshModel);
threshField.addChangeListener(e -> threshold = threshModel.getNumber().doubleValue());
JCheckBox medianBox = new JCheckBox("Apply Median Filter");
medianBox.setSelected(applyMedian);
......
......@@ -4,13 +4,13 @@
<parent>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-essentials</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</parent>
<artifactId>pickcells-ioImpl</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
<packaging>jar</packaging>
<name>pickcells-ioImpl</name>
<description>Implementation of the pickcells IO interfaces using the Scifio library as dependency</description>
......
......@@ -5,13 +5,13 @@
<parent>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-essentials</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</parent>
<artifactId>pickcells-provImpl</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
<packaging>jar</packaging>
<name>pickcells-provImpl</name>
<description>Implementation of the Image provider interfaces in Pickcells-img</description>
......
......@@ -8,7 +8,7 @@
</parent>
<artifactId>pickcells-essentials</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
<packaging>pom</packaging>
<name>pickcells-essentials-parent</name>
<description>Parent and Aggregator POM for building the PickCells essentials artifacts and maintaining module versions consistency</description>
......@@ -30,22 +30,22 @@
<dependency>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-ioImpl</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-provImpl</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-container</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>org.pickcellslab.pickcells</groupId>
<artifactId>pickcells-coremodules</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
</dependencies>
......
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