Skip to content

PORT: update behavior for duration labels from 1.4 diSPIM plugin#422

Merged
bls337 merged 2 commits into
micro-manager:mainfrom
bls337:main
Jul 2, 2026
Merged

PORT: update behavior for duration labels from 1.4 diSPIM plugin#422
bls337 merged 2 commits into
micro-manager:mainfrom
bls337:main

Conversation

@bls337

@bls337 bls337 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Always update the duration labels when when checking/unchecking the Advanced Timing check box. LSM previously only updated the duration labels when the unchecked.

VolumePanel.java now updates the duration labels when spnSliceStepSize_ , cmbNumViews_, and cmbFirstView_ change.

cmbNumViews_ and cmbFirstView_ are not used in SCAPE, but will be useful when implementing diSPIM.

We pulled the comment directly from the original plugin for spnSliceStepSize_.

SlicePanel.java now updates the duration labels when spnSampleExposure_, spnSlicePeriod_, and cbxMinimizePeriod_ are changed.

Note: this has no direct equivalent in the 1.4 plugin. This fixes a staleness bug in the duration labels.

CameraPanel.java now updates the duration labels when the camera trigger mode is changed.

      // Item 1
      // this action listener takes care of enabling/disabling inputs
      // of the advanced slice timing window
      // we call this to get GUI looking right
      ItemListener sliceTimingDisableGUIInputs = new ItemListener() {
         @Override
         public void itemStateChanged(ItemEvent e) {
            boolean enabled = advancedSliceTimingCB_.isSelected();
            // set other components in this advanced timing frame
            PanelUtils.componentsSetEnabled(advancedTimingComponents, enabled);
            // also control some components in main volume settings sub-panel
            PanelUtils.componentsSetEnabled(simpleTimingComponents_, !enabled);
            desiredSlicePeriod_.setEnabled(!enabled && !minSlicePeriodCB_.isSelected());
            desiredSlicePeriodLabel_.setEnabled(!enabled && !minSlicePeriodCB_.isSelected());
            updateDurationLabels();
         } 
      };
      
// Item 2
firstSide_.addActionListener(recalculateTimingDisplayAL); // this is cmbFirstView_in LSM

numSides_.addActionListener(recalculateTimingDisplayAL); // this is cmbNumViews_ in LSM

pu.addListenerLast(stepSize_, recalculateTimingDisplayCL);  // needed only for stage scanning b/c acceleration time related to speed (spnSliceStepSize_ in LSM)

// Item 3

// indirectly updated in recalculateSliceTiming(), which calls setValue on delayLaser_ and other variables that have recalculateTimingDisplayCL attached to them.

minSlicePeriodCB_.addActionListener(new ActionListener() {
           @Override
           public void actionPerformed(ActionEvent e) {
              boolean doMin = minSlicePeriodCB_.isSelected();
              desiredSlicePeriod_.setEnabled(!doMin);
              desiredSlicePeriodLabel_.setEnabled(!doMin);
              recalculateSliceTiming(false);
           }
        });

desiredLightExposure_.addChangeListener(recalculateTimingDisplayCL); // this is spnSampleExposure_ in LSM

desiredSlicePeriod_.addChangeListener(recalculateTimingDisplayCL); // this is spnSlicePeriod_ in LSM

// Item 4

camModeCB_  // check the original 1.4 plugin for details

@bls337 bls337 merged commit 9678b9d into micro-manager:main Jul 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant