|
| 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