diff --git a/src/main/java/org/mastodon/mamut/tomancak/TomancakPlugins.java b/src/main/java/org/mastodon/mamut/tomancak/TomancakPlugins.java index f9b19a6..4b04b92 100644 --- a/src/main/java/org/mastodon/mamut/tomancak/TomancakPlugins.java +++ b/src/main/java/org/mastodon/mamut/tomancak/TomancakPlugins.java @@ -59,7 +59,7 @@ import org.mastodon.mamut.tomancak.merging.Dataset; import org.mastodon.mamut.tomancak.merging.MergeDatasets; import org.mastodon.mamut.tomancak.merging.MergingDialog; -import org.mastodon.mamut.tomancak.resolve.AverageSpots; +import org.mastodon.mamut.tomancak.resolve.FuseSpots; import org.mastodon.mamut.tomancak.resolve.CreateConflictTagSetCommand; import org.mastodon.mamut.tomancak.resolve.LocateTagsFrame; import org.mastodon.mamut.tomancak.sort_tree.FlipDescendants; @@ -106,7 +106,7 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin private static final String CREATE_CONFLICT_TAG_SET = "[tomancak] create conflict tag set"; - private static final String COMBINE_SELECTED_SPOTS = "[tomancak] combine selected spots"; + private static final String FUSE_SPOTS = "[tomancak] fuse selected spots"; private static final String LOCATE_TAGS = "[tomancak] find tags"; @@ -132,7 +132,7 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin private static final String[] CREATE_CONFLICT_TAG_SET_KEYS = { "not mapped" }; - private static final String[] COMBINE_SELECTED_SPOTS_KEYS = { "not mapped" }; + private static final String[] FUSE_SPOTS_KEYS = { "not mapped" }; private static final String[] LOCATE_TAGS_KEYS = { "not mapped" }; @@ -160,7 +160,7 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin menuTexts.put( ADD_CENTER_SPOTS, "Add Center Spot" ); menuTexts.put( MIRROR_SPOTS, "Mirror Spots Along X-Axis" ); menuTexts.put( CREATE_CONFLICT_TAG_SET, "Create Conflict Tag Set" ); - menuTexts.put( COMBINE_SELECTED_SPOTS, "Combine Selected Spots" ); + menuTexts.put( FUSE_SPOTS, "Fuse Selected Spots" ); menuTexts.put( LOCATE_TAGS, "Find Tags" ); } @@ -200,7 +200,7 @@ public void getCommandDescriptions( final CommandDescriptions descriptions ) descriptions.add( ADD_CENTER_SPOTS, ADD_CENTER_SPOTS_KEYS, "On each timepoint with selected spots, add a new spot that is in the center (average position)." ); descriptions.add( MIRROR_SPOTS, MIRROR_SPOTS_KEYS, "Mirror spots along x-axis." ); descriptions.add( CREATE_CONFLICT_TAG_SET, CREATE_CONFLICT_TAG_SET_KEYS, "Search spots that overlap and create a tag set that highlights these conflicts." ); - descriptions.add( COMBINE_SELECTED_SPOTS, COMBINE_SELECTED_SPOTS_KEYS, "Combine selected spots into a single spot. Average spot position and shape." ); + descriptions.add( FUSE_SPOTS, FUSE_SPOTS_KEYS, "Fuse selected spots into a single spot. Average spot position and shape." ); descriptions.add( LOCATE_TAGS, LOCATE_TAGS_KEYS, "Open a dialog that allows to jump to specific tags." ); } } @@ -245,7 +245,7 @@ public void getCommandDescriptions( final CommandDescriptions descriptions ) private final AbstractNamedAction createConflictTagSet; - private final AbstractNamedAction combineSelectedSpots; + private final AbstractNamedAction fuseSpots; private final AbstractNamedAction locateTags; @@ -273,7 +273,7 @@ public TomancakPlugins() addCenterSpots = new RunnableAction( ADD_CENTER_SPOTS, this::addCenterSpots ); mirrorSpots = new RunnableAction( MIRROR_SPOTS, this::mirrorSpots ); createConflictTagSet = new RunnableAction( CREATE_CONFLICT_TAG_SET, this::createConflictTagSet ); - combineSelectedSpots = new RunnableAction( COMBINE_SELECTED_SPOTS, this::combineSelectedSpots ); + fuseSpots = new RunnableAction( FUSE_SPOTS, this::fuseSpots ); locateTags = new RunnableAction( LOCATE_TAGS, this::locateTags ); } @@ -311,7 +311,7 @@ public List< ViewMenuBuilder.MenuItem > getMenuItems() item( EXPORT_PHYLOXML ) ), menu( "Conflict Resolution", item( CREATE_CONFLICT_TAG_SET ), - item( COMBINE_SELECTED_SPOTS ), + item( FUSE_SPOTS ), item( LOCATE_TAGS ) ), item( MIRROR_SPOTS ) ), menu( "File", @@ -348,7 +348,7 @@ public void installGlobalActions( final Actions actions ) actions.namedAction( addCenterSpots, ADD_CENTER_SPOTS_KEYS ); actions.namedAction( mirrorSpots, MIRROR_SPOTS_KEYS ); actions.namedAction( createConflictTagSet, CREATE_CONFLICT_TAG_SET_KEYS ); - actions.namedAction( combineSelectedSpots, COMBINE_SELECTED_SPOTS_KEYS ); + actions.namedAction( fuseSpots, FUSE_SPOTS_KEYS ); actions.namedAction( locateTags, LOCATE_TAGS_KEYS ); } @@ -515,9 +515,9 @@ private void createConflictTagSet() CreateConflictTagSetCommand.run( pluginAppModel ); } - private void combineSelectedSpots() + private void fuseSpots() { - AverageSpots.run( pluginAppModel ); + FuseSpots.run( pluginAppModel ); } private void locateTags() diff --git a/src/main/java/org/mastodon/mamut/tomancak/resolve/AverageSpots.java b/src/main/java/org/mastodon/mamut/tomancak/resolve/FuseSpots.java similarity index 99% rename from src/main/java/org/mastodon/mamut/tomancak/resolve/AverageSpots.java rename to src/main/java/org/mastodon/mamut/tomancak/resolve/FuseSpots.java index 5524b76..1ec03fb 100644 --- a/src/main/java/org/mastodon/mamut/tomancak/resolve/AverageSpots.java +++ b/src/main/java/org/mastodon/mamut/tomancak/resolve/FuseSpots.java @@ -18,7 +18,7 @@ import org.mastodon.model.tag.TagSetModel; import org.mastodon.model.tag.TagSetStructure; -public class AverageSpots +public class FuseSpots { public static void run( final ProjectModel projectModel ) { diff --git a/src/test/java/org/mastodon/mamut/tomancak/resolve/AverageSpotsTest.java b/src/test/java/org/mastodon/mamut/tomancak/resolve/FuseSpotsTest.java similarity index 96% rename from src/test/java/org/mastodon/mamut/tomancak/resolve/AverageSpotsTest.java rename to src/test/java/org/mastodon/mamut/tomancak/resolve/FuseSpotsTest.java index 2ab209e..0ab5831 100644 --- a/src/test/java/org/mastodon/mamut/tomancak/resolve/AverageSpotsTest.java +++ b/src/test/java/org/mastodon/mamut/tomancak/resolve/FuseSpotsTest.java @@ -17,7 +17,7 @@ import org.mastodon.util.TagHelper; import org.mastodon.util.TagSetUtils; -public class AverageSpotsTest +public class FuseSpotsTest { @Test public void testRun() @@ -47,7 +47,7 @@ public void testRun() tagB.tagLink( graph.addEdge( b2, b3 ).init() ); tagB.tagLink( graph.addEdge( b3, b4 ).init() ); - AverageSpots.run( model, Arrays.asList( a2, a3, b2, b3 ), a2 ); + FuseSpots.run( model, Arrays.asList( a2, a3, b2, b3 ), a2 ); assertEquals( 6, graph.vertices().size() ); assertArrayEquals( new double[] { 2, 1.5, 1 }, a2.positionAsDoubleArray(), 1e-10 );