Skip to content

Commit 62e8b48

Browse files
authored
Merge pull request #3 from trackmate-sc/v8-new
Adapt to the TrackMate v8 API
2 parents 0a7ea6e + 321cb13 commit 62e8b48

4 files changed

Lines changed: 57 additions & 173 deletions

File tree

pom.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>org.scijava</groupId>
77
<artifactId>pom-scijava</artifactId>
8-
<version>34.0.0</version>
8+
<version>43.0.0</version>
99
<relativePath />
1010
</parent>
1111

1212
<groupId>sc.fiji</groupId>
1313
<artifactId>TrackMate-Weka</artifactId>
14-
<version>1.3.2-SNAPSHOT</version>
14+
<version>2.0.0-SNAPSHOT</version>
1515

1616
<name>TrackMate-Weka</name>
1717
<description>TrackMate detector based on the Weka trainable segmentation plugin.</description>
@@ -84,9 +84,7 @@
8484
<!-- NB: Deploy releases to the SciJava Maven repository. -->
8585
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
8686

87-
<javaGeom.version>0.11.1</javaGeom.version>
88-
89-
<TrackMate.version>7.10.2</TrackMate.version>
87+
<TrackMate.version>8.0.0</TrackMate.version>
9088
</properties>
9189

9290
<dependencies>
@@ -131,13 +129,6 @@
131129
<artifactId>scijava-common</artifactId>
132130
</dependency>
133131

134-
<!-- Other dependencies -->
135-
<dependency>
136-
<groupId>math.geom2d</groupId>
137-
<artifactId>javaGeom</artifactId>
138-
<version>${javaGeom.version}</version>
139-
</dependency>
140-
141132
<!-- Test dependencies -->
142133
<dependency>
143134
<groupId>junit</groupId>

src/main/java/fiji/plugin/trackmate/weka/WekaDetectorConfigurationPanel.java

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* it under the terms of the GNU General Public License as
99
* published by the Free Software Foundation, either version 3 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Public License for more details.
16-
*
16+
*
1717
* You should have received a copy of the GNU General Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -26,6 +26,7 @@
2626
import static fiji.plugin.trackmate.gui.Fonts.FONT;
2727
import static fiji.plugin.trackmate.gui.Fonts.SMALL_FONT;
2828
import static fiji.plugin.trackmate.gui.Icons.MAGNIFIER_ICON;
29+
import static fiji.plugin.trackmate.weka.WekaDetectorFactory.ICON;
2930
import static fiji.plugin.trackmate.weka.WekaDetectorFactory.KEY_CLASSIFIER_FILEPATH;
3031
import static fiji.plugin.trackmate.weka.WekaDetectorFactory.KEY_CLASS_INDEX;
3132
import static fiji.plugin.trackmate.weka.WekaDetectorFactory.KEY_PROBA_THRESHOLD;
@@ -36,7 +37,6 @@
3637
import java.awt.Insets;
3738
import java.beans.PropertyChangeListener;
3839
import java.io.File;
39-
import java.net.URL;
4040
import java.text.DecimalFormat;
4141
import java.text.NumberFormat;
4242
import java.util.Arrays;
@@ -46,7 +46,6 @@
4646
import java.util.Vector;
4747

4848
import javax.swing.DefaultComboBoxModel;
49-
import javax.swing.ImageIcon;
5049
import javax.swing.JButton;
5150
import javax.swing.JComboBox;
5251
import javax.swing.JFormattedTextField;
@@ -80,8 +79,6 @@ public class WekaDetectorConfigurationPanel extends ConfigurationPanel
8079

8180
private static final NumberFormat THRESHOLD_FORMAT = new DecimalFormat( "#.##" );
8281

83-
protected static final ImageIcon ICON = new ImageIcon( getResource( "images/TrackMateWeka-logo-100px.png" ) );
84-
8582
private static final String TITLE = WekaDetectorFactory.NAME;
8683

8784
private static final FileFilter fileFilter = new FileNameExtensionFilter( "Weka classifier files.", "model" );
@@ -114,9 +111,8 @@ public WekaDetectorConfigurationPanel( final Settings settings, final Model mode
114111

115112
final GridBagLayout gridBagLayout = new GridBagLayout();
116113
gridBagLayout.columnWidths = new int[] { 144, 0, 32 };
117-
gridBagLayout.rowHeights = new int[] { 0, 84, 0, 27, 0, 0, 0, 0, 37, 23 };
114+
gridBagLayout.rowHeights = new int[] { 0, 0, 0, 27, 0, 0, 0, 0, 150 };
118115
gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0 };
119-
gridBagLayout.rowWeights = new double[] { 0., 1., 0., 0., 0., 0., 0., 0., 0., 0. };
120116
setLayout( gridBagLayout );
121117

122118
final JLabel lblDetector = new JLabel( TITLE, ICON, JLabel.RIGHT );
@@ -140,7 +136,13 @@ public WekaDetectorConfigurationPanel( final Settings settings, final Model mode
140136
gbcLblHelptext.insets = new Insets( 5, 10, 5, 10 );
141137
gbcLblHelptext.gridx = 0;
142138
gbcLblHelptext.gridy = 1;
143-
add( GuiUtils.textInScrollPanel( GuiUtils.infoDisplay( WekaDetectorFactory.INFO_TEXT ) ), gbcLblHelptext );
139+
gbcLblHelptext.weighty = 1.;
140+
add( GuiUtils.textInScrollPanel( GuiUtils.infoDisplay(
141+
"<html>Online documentation: <br/>"
142+
+ "<a href='" + WekaDetectorFactory.DOC_URL + "'>"
143+
+ WekaDetectorFactory.DOC_URL
144+
+ "</a></html>" ) ),
145+
gbcLblHelptext );
144146

145147
/*
146148
* Channel selector.
@@ -433,9 +435,4 @@ public void run()
433435
}
434436
}.start();
435437
}
436-
437-
protected static URL getResource( final String name )
438-
{
439-
return WekaDetectorFactory.class.getClassLoader().getResource( name );
440-
}
441438
}

0 commit comments

Comments
 (0)