This commit is contained in:
sfop
2017-03-30 14:04:31 +02:00
parent 542c97720f
commit 6b7ae3d3c4
2 changed files with 14 additions and 14 deletions

View File

@@ -1622,12 +1622,12 @@ public class ScreenPanel extends Panel {
panel.add(p1, BorderLayout.NORTH);
JPanel p2 = new JPanel(new BorderLayout());
((BorderLayout) p2.getLayout()).setHgap(5);
p2.add(new JLabel("Reference marker width: "), BorderLayout.WEST);
p2.add(new JLabel("Reference marker width (um): "), BorderLayout.WEST);
p2.add(textWidth, BorderLayout.EAST);
panel.add(p2, BorderLayout.CENTER);
JPanel p3 = new JPanel(new BorderLayout());
((BorderLayout) p3.getLayout()).setHgap(5);
p3.add(new JLabel("Reference marker height: "), BorderLayout.WEST);
p3.add(new JLabel("Reference marker height(um): "), BorderLayout.WEST);
p3.add(textHeight, BorderLayout.EAST);
panel.add(p3, BorderLayout.SOUTH);
textWidth.setPreferredSize(new Dimension(70, textWidth.getPreferredSize().height));
@@ -1655,10 +1655,10 @@ public class ScreenPanel extends Panel {
HashMap c = new HashMap();
c.put("reference_marker", Arrays.asList(new Integer[]{x1, y1, x2, y2}));
if (textWidth.getText().trim().length() > 0){
c.put("reference_marker_width", Integer.valueOf(textWidth.getText()));
c.put("reference_marker_width", Double.valueOf(textWidth.getText()));
}
if (textHeight.getText().trim().length() > 0){
c.put("reference_marker_height", Integer.valueOf(textHeight.getText()));
c.put("reference_marker_height", Double.valueOf(textHeight.getText()));
}
((Camtool) camera).setCalibration(cameraName, c);
Logger.getLogger(ScreenPanel.class.getName()).warning("Updated " + cameraName + " calibration: " + x1 + ", "+ x2 + ", " + y1 + ", " + y2);