Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.gui.components.Button;
import org.micromanager.lightsheetmanager.gui.components.ComboBox;
import org.micromanager.lightsheetmanager.gui.components.ListeningPanel;
import org.micromanager.lightsheetmanager.gui.components.Panel;
import org.micromanager.lightsheetmanager.gui.components.Spinner;
Expand Down Expand Up @@ -30,6 +31,8 @@ public class CameraTab extends Panel implements ListeningPanel {
private Spinner spnWidth_;
private Spinner spnHeight_;

private ComboBox<String> cmbBinning_;

private final LightSheetManager model_;

public CameraTab(final LightSheetManager model) {
Expand Down Expand Up @@ -62,6 +65,25 @@ private void createUserInterface() {
spnWidth_ = Spinner.createIntegerSpinner(0, 0, Integer.MAX_VALUE, 1, 6);
spnHeight_ = Spinner.createIntegerSpinner(0, 0, Integer.MAX_VALUE, 1, 6);

// these buttons write the roi to the cameras at once, including cameras that are acquiring
final String notDuringRun = " Do not use while an acquisition is running.";
btnFullROI_.setToolTipText(
"Set every active imaging camera to its full sensor." + notDuringRun);
btnHalfROI_.setToolTipText("Set every active imaging camera to a centered ROI of half "
+ "the sensor width and height." + notDuringRun);
btnQuarterROI_.setToolTipText("Set every active imaging camera to a centered ROI of a "
+ "quarter of the sensor width and height." + notDuringRun);
btnEigthROI_.setToolTipText("Set every active imaging camera to a centered ROI of an "
+ "eighth of the sensor width and height." + notDuringRun);
btnCustomROI_.setToolTipText("Set every active imaging camera to the offset and size "
+ "below." + notDuringRun);
btnCurrentROI_.setToolTipText(
"Fill in the fields above from the first imaging camera's current ROI.");
spnOffsetX_.setToolTipText("Left edge of the Custom ROI, in binned pixels.");
spnOffsetY_.setToolTipText("Top edge of the Custom ROI, in binned pixels.");
spnWidth_.setToolTipText("Width of the Custom ROI, in binned pixels.");
spnHeight_.setToolTipText("Height of the Custom ROI, in binned pixels.");

pnlROI.add(btnUnchangedROI_, "span 2, wrap");
pnlROI.add(btnFullROI_, "");
pnlROI.add(btnHalfROI_, "wrap");
Expand All @@ -78,8 +100,19 @@ private void createUserInterface() {
pnlROI.add(spnHeight_, "wrap");
pnlROI.add(btnCurrentROI_, "span 2");

final Panel pnlBinning = new Panel("Binning");

// TODO: list the binnings the imaging cameras share and enable the combo box
cmbBinning_ = new ComboBox<>(new String[0], null, 80, 20);
cmbBinning_.setEnabled(false);
cmbBinning_.setToolTipText("Binning cannot be set here yet.");

pnlBinning.add(new JLabel("All imaging cameras:"), "");
pnlBinning.add(cmbBinning_, "wrap");

add(lblTitle, "wrap");
add(pnlROI, "wrap");
add(pnlBinning, "wrap");
}

// TODO: should change roi for all cameras?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.micromanager.lightsheetmanager.gui.tabs;

import org.micromanager.lightsheetmanager.api.data.CameraMode;
import org.micromanager.lightsheetmanager.api.data.GeometryType;
import org.micromanager.lightsheetmanager.LightSheetManagerFrame;
import org.micromanager.lightsheetmanager.LightSheetManager;
import org.micromanager.lightsheetmanager.model.DeviceManager;
Expand Down Expand Up @@ -76,6 +77,15 @@ private void createUserInterface() {
index = tabbedPane_.getTabCount();
tabbedPane_.add(tabName, setupPathTab);
tabbedPane_.setTabComponentAt(index, createTabTitle(tabName));
if (devices_.isUsingPLogic()) {
// set on the tab and not on its title label: a label with a tooltip takes the
// mouse clicks, and the tab could then no longer be selected by its title
final boolean isScape = devices_.adapter().geometry() == GeometryType.SCAPE;
final String name = isScape ? "sheet" : "beam";
tabbedPane_.setToolTipTextAt(index, "Opening this tab moves the imaging piezo "
+ "and the " + name + " to the imaging center and sets the " + name
+ " to match the " + (isScape ? "Sheet" : "Beam") + " box.");
}
setupPathTabs_.add(setupPathTab);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ private void createUserInterface() {
cbxPollPositions_ = new CheckBox("Poll Positions",
model_.pluginSettings().isPollingPositions());

btnHaltDevices_.setToolTipText(
"Stop every stage and piezo at once. This does not stop an acquisition.");
cbxPollPositions_.setToolTipText(
"Read the device positions in the background and show them on this tab.");

// Property prefixes
final String illum = "Illum";
final String imaging = "Imaging";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ private void createUserInterface() {

btnRunAutofocus_.setEnabled(false);

final String name = (geometryType == GeometryType.SCAPE) ? "sheet" : "beam";
btnUpdate_.setToolTipText("Set the piezo offset and the imaging center from the current "
+ "piezo and slice positions. The " + name + " must be on.");
txtSlope_.setToolTipText("Galvo constant in μm per degree. Press Enter to apply.");
txtOffset_.setToolTipText(
"Piezo offset in μm. Press Enter to apply. This also sets the imaging center.");

lblSlopeValue_.setMinimumSize(new Dimension(74, 20));
lblOffsetValue_.setMinimumSize(new Dimension(74, 20));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ private void createUserInterface() {
add(btnLiveMode_, "span 2");
break;
case SCAPE:
btnInvertedPath_.setToolTipText("Show live images from the preview camera. "
+ "This makes it the current camera and sets it to internal trigger.");
btnLiveMode_.setToolTipText("Show live images from the first imaging camera. "
+ "This makes it the current camera and sets it to internal trigger.");
cmbPreset_.setToolTipText("Apply a preset of the \"" + CONFIG_GROUP
+ "\" configuration group. The light path switches at once.");
add(btnInvertedPath_, "wrap");
add(btnLiveMode_, "wrap");
add(new JLabel("Path Preset:"), "wrap");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ private void createUserInterface() {
cmbLeftWheel_ = new ComboBox<>(wheelLabels, previousLeftWheel_, 100, 24);
cmbRightWheel_ = new ComboBox<>(wheelLabels, previousRightWheel_, 100, 24);

cmbJoystick_.setToolTipText(
"Choose what the joystick moves. The previous choice stops following it.");
cmbLeftWheel_.setToolTipText(
"Choose what the left wheel moves. The previous choice stops following it.");
cmbRightWheel_.setToolTipText(
"Choose what the right wheel moves. The previous choice stops following it.");

add(lblJoystick, "");
add(cmbJoystick_, "wrap");
add(lblLeftWheel, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ private void createUserInterface() {
lblSlicePositionValue_.setMinimumSize(new Dimension(60, 20));

// tooltips
btnImagingCenterGo_.setToolTipText("Move \"Imaging Piezo\" position to \"Imaging Center\" value.");
btnImagingCenterGo_.setToolTipText("Move \"Imaging Piezo\" to the \"Imaging Center\" "
+ "value and the slice position to match it.");
txtSlicePosition_.setToolTipText(
"Type a slice position in degrees and press Enter to move there.");
txtImagingPosition_.setToolTipText(
"Type an imaging piezo position in μm and press Enter to move there.");
//btnImagingCenterSet_.setToolTipText("Set \"Imaging Center\" value to \"Imaging Piezo\" position. ");
btnSliceZero_.setToolTipText("Move \"Slice Position\" position to 0 degrees.");
btnImagingZero_.setToolTipText("Move \"Imaging Piezo\" position to 0 μm.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ private void createUserInterface() {
if (isUsingPLogic_) {
final ASIScanner scanner = model_.devices().device("IllumSlice");
cbxBeamExc_.setSelected(scanner.isBeamOn());
final String name = (geometryType == GeometryType.SCAPE) ? "sheet" : "beam";
cbxBeamExc_.setToolTipText("Turn the " + name + " on or off. Opening this tab sets the "
+ name + " to match this box.");
}

switch (geometryType) {
Expand Down
Loading