Skip to content

Commit

Permalink
Rename menu entry "Combine Spots" -> "Fuse Spots"
Browse files Browse the repository at this point in the history
  • Loading branch information
maarzt committed Jun 25, 2024
1 parent ac1c312 commit a43cca2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions src/main/java/org/mastodon/mamut/tomancak/TomancakPlugins.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";

Expand All @@ -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" };

Expand Down Expand Up @@ -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" );
}

Expand Down Expand Up @@ -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." );
}
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 );
}

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 );
}

Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.mastodon.util.TagHelper;
import org.mastodon.util.TagSetUtils;

public class AverageSpotsTest
public class FuseSpotsTest
{
@Test
public void testRun()
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit a43cca2

Please sign in to comment.