Skip to content

Commit c74504e

Browse files
authored
Merge pull request #242 from trackmate-sc/fill-gaps-detect
Close gaps by detection and new framework for gap-closing methods.
2 parents 08fc1b1 + 160659b commit c74504e

10 files changed

Lines changed: 891 additions & 208 deletions

File tree

src/main/java/fiji/plugin/trackmate/action/CloseGapsByLinearInterpolationAction.java

Lines changed: 0 additions & 201 deletions
This file was deleted.

src/main/java/fiji/plugin/trackmate/action/autonaming/AutoNamingController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void run()
6868
{
6969
try
7070
{
71-
logger.log( "Applying nameing rule: " + autoNaming.toString() + ".\n" );
71+
logger.log( "Applying naming rule: " + autoNaming.toString() + ".\n" );
7272
logger.setStatus( "Spot auto-naming" );
7373
AutoNamingPerformer.autoNameSpots( trackmate.getModel(), autoNaming );
7474
trackmate.getModel().notifyFeaturesComputed();
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
package fiji.plugin.trackmate.action.closegaps;
2+
3+
import java.awt.Frame;
4+
5+
import javax.swing.ImageIcon;
6+
7+
import org.scijava.plugin.Plugin;
8+
9+
import fiji.plugin.trackmate.SelectionModel;
10+
import fiji.plugin.trackmate.TrackMate;
11+
import fiji.plugin.trackmate.action.AbstractTMAction;
12+
import fiji.plugin.trackmate.action.TrackMateAction;
13+
import fiji.plugin.trackmate.action.TrackMateActionFactory;
14+
import fiji.plugin.trackmate.gui.Icons;
15+
import fiji.plugin.trackmate.gui.displaysettings.DisplaySettings;
16+
17+
public class CloseGapsAction extends AbstractTMAction
18+
{
19+
20+
public static final String NAME = "Close gaps by introducing new spots";
21+
22+
public static final String KEY = "CLOSE_GAPS";
23+
24+
public static final String INFO_TEXT = "<html>"
25+
+ "This action proposes several methods to close gaps in tracks."
26+
+ "<p>"
27+
+ "Gaps are part of tracks where spots are missing in one or "
28+
+ "several consecutive frames. The listed methods can "
29+
+ "introduce new spots in such gaps, depending on possibly "
30+
+ "the other spots in tracks and/or the image data."
31+
+ "<p>"
32+
+ "They are useful to fix missed detection when a uninterrupted "
33+
+ "list of position is required for track analysis. For instance "
34+
+ "in FRAP experiments, where you need to measure signal intensity "
35+
+ "changing during time, even if the spot is not visible."
36+
+ "</html>";
37+
38+
public static final ImageIcon ICON = Icons.ORANGE_ASTERISK_ICON;
39+
40+
@Override
41+
public void execute( final TrackMate trackmate, final SelectionModel selectionModel, final DisplaySettings displaySettings, final Frame parent )
42+
{
43+
final CloseGapsController controller = new CloseGapsController( trackmate, logger );
44+
controller.show();
45+
}
46+
47+
@Plugin( type = TrackMateActionFactory.class )
48+
public static class Factory implements TrackMateActionFactory
49+
{
50+
51+
@Override
52+
public String getInfoText()
53+
{
54+
return INFO_TEXT;
55+
}
56+
57+
@Override
58+
public String getKey()
59+
{
60+
return KEY;
61+
}
62+
63+
@Override
64+
public TrackMateAction create()
65+
{
66+
return new CloseGapsAction();
67+
}
68+
69+
@Override
70+
public ImageIcon getIcon()
71+
{
72+
return ICON;
73+
}
74+
75+
@Override
76+
public String getName()
77+
{
78+
return NAME;
79+
}
80+
}
81+
}

0 commit comments

Comments
 (0)