Image OTF
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import ch.psi.pshell.epics.ChannelDouble;
|
||||
import ch.psi.pshell.epics.ChannelInteger;
|
||||
import ch.psi.pshell.imaging.ColormapSource;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -89,7 +91,7 @@ public class Eiger extends Panel {
|
||||
renderer = new ch.psi.pshell.imaging.Renderer();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
comboDepth = new javax.swing.JComboBox<>();
|
||||
buttonTriggerDetector = new javax.swing.JButton();
|
||||
buttonStartDetector = new javax.swing.JButton();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
comboMode = new javax.swing.JComboBox<>();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
@@ -101,9 +103,19 @@ public class Eiger extends Panel {
|
||||
deviceValuePanel4 = new ch.psi.pshell.swing.DeviceValuePanel();
|
||||
buttonShowDetectorPanel = new javax.swing.JButton();
|
||||
checkMeasurements = new javax.swing.JCheckBox();
|
||||
buttonAquire = new javax.swing.JButton();
|
||||
buttonDone = new javax.swing.JButton();
|
||||
buttonOpenVG10 = new javax.swing.JButton();
|
||||
buttonCloseVG10 = new javax.swing.JButton();
|
||||
comboScale = new javax.swing.JComboBox<>();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
spinnerMax = new javax.swing.JSpinner();
|
||||
spinnerMin = new javax.swing.JSpinner();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
|
||||
renderer.setDeviceName("image");
|
||||
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Fit);
|
||||
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Stretch);
|
||||
|
||||
jLabel1.setText("Bit Depth:");
|
||||
|
||||
@@ -115,16 +127,16 @@ public class Eiger extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
buttonTriggerDetector.setText("Start IOC");
|
||||
buttonTriggerDetector.addActionListener(new java.awt.event.ActionListener() {
|
||||
buttonStartDetector.setText("Start Eiger");
|
||||
buttonStartDetector.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonTriggerDetectorActionPerformed(evt);
|
||||
buttonStartDetectorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel2.setText("Mode:");
|
||||
|
||||
comboMode.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Single", "Multiple", "Continuous" }));
|
||||
comboMode.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Single", "Continuous" }));
|
||||
comboMode.setEnabled(false);
|
||||
comboMode.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -132,7 +144,7 @@ public class Eiger extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
jLabel3.setText("Exposure:");
|
||||
jLabel3.setText("Exposure [s]:");
|
||||
|
||||
spinnerExpusure.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 300.0d, 1.0d));
|
||||
spinnerExpusure.setEnabled(false);
|
||||
@@ -148,7 +160,7 @@ public class Eiger extends Panel {
|
||||
|
||||
deviceValuePanel3.setDeviceName("eiger_exposure_rbv");
|
||||
|
||||
buttonStopDetector.setText("Stop IOC");
|
||||
buttonStopDetector.setText("Stop Eiger");
|
||||
buttonStopDetector.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonStopDetectorActionPerformed(evt);
|
||||
@@ -171,77 +183,179 @@ public class Eiger extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
buttonAquire.setText("Aquire");
|
||||
buttonAquire.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonAquireActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonDone.setText("Done");
|
||||
buttonDone.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonDoneActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonOpenVG10.setText("Open VG10");
|
||||
buttonOpenVG10.setMaximumSize(new java.awt.Dimension(68, 27));
|
||||
buttonOpenVG10.setMinimumSize(new java.awt.Dimension(68, 27));
|
||||
buttonOpenVG10.setPreferredSize(new java.awt.Dimension(68, 27));
|
||||
buttonOpenVG10.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonOpenVG10ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonCloseVG10.setText("Close VG10");
|
||||
buttonCloseVG10.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonCloseVG10ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
comboScale.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Auto", "Manual" }));
|
||||
comboScale.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
comboScaleActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel4.setText("Scale:");
|
||||
|
||||
spinnerMax.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
spinnerMaxStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerMin.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
spinnerMinStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel5.setText("Max:");
|
||||
|
||||
jLabel6.setText("Min:");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(jLabel3))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(224, 224, 224)
|
||||
.addComponent(buttonDone, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonShowDetectorPanel))
|
||||
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonStopDetector, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap(68, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(spinnerExpusure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(checkMeasurements)))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(spinnerExpusure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(comboDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonAquire, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonStartDetector)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addComponent(buttonStopDetector, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonTriggerDetector, javax.swing.GroupLayout.Alignment.TRAILING)))
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(4, 4, 4))
|
||||
.addComponent(checkMeasurements)
|
||||
.addComponent(comboScale, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel5)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(spinnerMax, javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerMin, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonStopDetector, buttonTriggerDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExpusure});
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonShowDetectorPanel, checkMeasurements});
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonStartDetector, buttonStopDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, spinnerExpusure});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER, false)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonShowDetectorPanel)
|
||||
.addComponent(buttonTriggerDetector))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(buttonAquire, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonStartDetector)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER, false)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(comboDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonStopDetector))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(buttonDone, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonStopDetector)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(spinnerExpusure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(checkMeasurements)
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
|
||||
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(36, 36, 36)
|
||||
.addComponent(checkMeasurements)
|
||||
.addGap(45, 45, 45)
|
||||
.addComponent(jLabel4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(comboScale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel5)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerMax, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel6)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerMin, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {buttonShowDetectorPanel, buttonStopDetector, buttonTriggerDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExpusure});
|
||||
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {buttonStartDetector, buttonStopDetector, comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, deviceValuePanel4, spinnerExpusure});
|
||||
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@@ -258,7 +372,7 @@ public class Eiger extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_comboDepthActionPerformed
|
||||
|
||||
private void buttonTriggerDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonTriggerDetectorActionPerformed
|
||||
private void buttonStartDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartDetectorActionPerformed
|
||||
try {
|
||||
evalAsync("start_eiger_ioc()").handle((ret,ex)->{
|
||||
if (ex!=null){
|
||||
@@ -269,12 +383,15 @@ public class Eiger extends Panel {
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonTriggerDetectorActionPerformed
|
||||
}//GEN-LAST:event_buttonStartDetectorActionPerformed
|
||||
|
||||
private void comboModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboModeActionPerformed
|
||||
try{
|
||||
if (!updatingControls){
|
||||
Integer value = comboMode.getSelectedIndex();
|
||||
if (value==1){
|
||||
value++;
|
||||
}
|
||||
mode.write(value);
|
||||
}
|
||||
} catch (Exception ex){
|
||||
@@ -326,13 +443,103 @@ public class Eiger extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_checkMeasurementsActionPerformed
|
||||
|
||||
private void buttonDoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDoneActionPerformed
|
||||
try {
|
||||
((ch.psi.pshell.device.Camera) getDevice("eiger")).stop();
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonDoneActionPerformed
|
||||
|
||||
private void buttonAquireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAquireActionPerformed
|
||||
try {
|
||||
((ch.psi.pshell.device.Camera) getDevice("eiger")).start();
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonAquireActionPerformed
|
||||
|
||||
private void buttonOpenVG10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOpenVG10ActionPerformed
|
||||
try {
|
||||
evalAsync("open_vg10()").handle((ret,ex)->{
|
||||
if (ex!=null){
|
||||
showException((Exception)ex);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonOpenVG10ActionPerformed
|
||||
|
||||
private void buttonCloseVG10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCloseVG10ActionPerformed
|
||||
try {
|
||||
evalAsync("close_vg10()").handle((ret,ex)->{
|
||||
if (ex!=null){
|
||||
showException((Exception)ex);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonCloseVG10ActionPerformed
|
||||
|
||||
private void comboScaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboScaleActionPerformed
|
||||
ColormapSource source = (ColormapSource) renderer.getOrigin();
|
||||
|
||||
try{
|
||||
if (!updatingControls){
|
||||
Integer value = comboScale.getSelectedIndex();
|
||||
if(value == 0){
|
||||
source.getConfig().colormapAutomatic = true;
|
||||
}
|
||||
else if(value == 1){
|
||||
source.getConfig().colormapAutomatic = false;
|
||||
}
|
||||
source.getConfig().save();
|
||||
}
|
||||
} catch (Exception ex){
|
||||
getLogger().log(Level.WARNING, null, ex);
|
||||
}
|
||||
}//GEN-LAST:event_comboScaleActionPerformed
|
||||
|
||||
private void spinnerMaxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerMaxStateChanged
|
||||
ColormapSource source = (ColormapSource) renderer.getOrigin();
|
||||
source.getConfig().colormapMax = (Double)spinnerMax.getValue();
|
||||
|
||||
try {
|
||||
source.getConfig().save();
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.WARNING, null, ex);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_spinnerMaxStateChanged
|
||||
|
||||
private void spinnerMinStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerMinStateChanged
|
||||
ColormapSource source = (ColormapSource) renderer.getOrigin();
|
||||
source.getConfig().colormapMax = (Double)spinnerMin.getValue();
|
||||
|
||||
try {
|
||||
source.getConfig().save();
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.WARNING, null, ex);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_spinnerMinStateChanged
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAquire;
|
||||
private javax.swing.JButton buttonCloseVG10;
|
||||
private javax.swing.JButton buttonDone;
|
||||
private javax.swing.JButton buttonOpenVG10;
|
||||
private javax.swing.JButton buttonShowDetectorPanel;
|
||||
private javax.swing.JButton buttonStartDetector;
|
||||
private javax.swing.JButton buttonStopDetector;
|
||||
private javax.swing.JButton buttonTriggerDetector;
|
||||
private javax.swing.JCheckBox checkMeasurements;
|
||||
private javax.swing.JComboBox<String> comboDepth;
|
||||
private javax.swing.JComboBox<String> comboMode;
|
||||
private javax.swing.JComboBox<String> comboScale;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel1;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel2;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel3;
|
||||
@@ -340,7 +547,12 @@ public class Eiger extends Panel {
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private ch.psi.pshell.imaging.Renderer renderer;
|
||||
private javax.swing.JSpinner spinnerExpusure;
|
||||
private javax.swing.JSpinner spinnerMax;
|
||||
private javax.swing.JSpinner spinnerMin;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user