forked from micro-manager/micro-manager
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request micro-manager#2036 from nicost/PairedStageControl
LightSheetControl renamed to PairedStageControl.
- Loading branch information
Showing
7 changed files
with
93 additions
and
94 deletions.
There are no files selected for viewing
59 changes: 0 additions & 59 deletions
59
...LightSheetControl/src/main/java/org/micromanager/lightsheetcontrol/LightSheetControl.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
plugins/LightSheetControl/build.xml → plugins/PairedStageControl/build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<project name="LightSheetControl" default="jar"> | ||
<project name="PairedStageControl" default="jar"> | ||
<import file="../javapluginbuild.xml"/> | ||
</project> |
84 changes: 84 additions & 0 deletions
84
...redStageControl/src/main/java/org/micromanager/pairedstagecontrol/PairedStageControl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/** | ||
* | ||
* @author kthorn | ||
*/ | ||
|
||
package org.micromanager.pairedstagecontrol; | ||
|
||
import java.util.Iterator; | ||
import mmcorej.DeviceType; | ||
import mmcorej.StrVector; | ||
import org.micromanager.MenuPlugin; | ||
import org.micromanager.Studio; | ||
import org.scijava.plugin.Plugin; | ||
import org.scijava.plugin.SciJavaPlugin; | ||
|
||
@Plugin(type = MenuPlugin.class) | ||
public class PairedStageControl implements MenuPlugin, SciJavaPlugin { | ||
public static final String menuName = "Paired Stage Control"; | ||
public static final String tooltipDescription = | ||
"Combines the movement of two stages through the Utilities-MultiStage device."; | ||
private Studio studio_; | ||
private PairedStageControlFrame myFrame_; | ||
|
||
@Override | ||
public String getSubMenu() { | ||
return "Device Control"; | ||
} | ||
|
||
@Override | ||
public void onPluginSelected() { | ||
if (myFrame_ == null) { | ||
String multiStageName = ""; | ||
//Find multi stage device | ||
StrVector stages = studio_.core().getLoadedDevicesOfType(DeviceType.StageDevice); | ||
final Iterator<String> stageIter = stages.iterator(); | ||
while (stageIter.hasNext()) { | ||
String devName = ""; | ||
String devLabel = stageIter.next(); | ||
try { | ||
devName = studio_.core().getDeviceName(devLabel); | ||
} catch (Exception ex) { | ||
studio_.logs().logError(ex, "Error when requesting stage name"); | ||
} | ||
if (devName.equals("Multi Stage")) { | ||
multiStageName = devLabel; | ||
} | ||
} | ||
if (multiStageName.isEmpty()) { | ||
studio_.logs().showError("Cannot find multi stage device. " | ||
+ "This plugin does not work without one. " | ||
+ "Use the Hardware Configuration wizard and select Utilities > MultiStage"); | ||
return; | ||
} | ||
myFrame_ = new PairedStageControlFrame(studio_, multiStageName); | ||
} | ||
myFrame_.setVisible(true); | ||
} | ||
|
||
@Override | ||
public void setContext(Studio studio) { | ||
studio_ = studio; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return menuName; | ||
} | ||
|
||
@Override | ||
public String getHelpText() { | ||
return "Plugin for controlling AZ100 light sheet microscope in the Nikon Imaging Center," | ||
+ " UCSF. See Kurt Thorn with questions."; | ||
} | ||
|
||
@Override | ||
public String getVersion() { | ||
return "v0.2"; | ||
} | ||
|
||
@Override | ||
public String getCopyright() { | ||
return "University of California, 2016, 2024"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ger/lightsheetcontrol/XYChartPlotter.java → ...er/pairedstagecontrol/XYChartPlotter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters