Closedown

This commit is contained in:
sfop
2016-09-19 15:29:53 +02:00
parent 0598ad73b9
commit d0e19269de
2 changed files with 5 additions and 5 deletions

View File

@@ -53,7 +53,6 @@ import java.awt.Dimension;
import java.awt.Font;
import java.awt.Point;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -426,6 +425,7 @@ public class ScreenPanel extends Panel {
try {
filter = new DiscretePositioner(cameraName + ":SET_FILTER", cameraName + ":GET_FILTER");
filter.setTrustedWrite(true);
filter.initialize();
DefaultComboBoxModel model = new DefaultComboBoxModel();
for (String pos : filter.getPositions()) {
@@ -1629,10 +1629,11 @@ public class ScreenPanel extends Panel {
renderer.saveSnapshot(snapshotFile, "png", true);
getController().setExecutionContext("snapshot", null, null, null, null, null, null, null);
getController().getDataManager().setDataset("/data", renderer.getData().getMatrix(), renderer.getData().isUnsigned());
getController().getDataManager().closeOutput();
//byte[] arr = (byte[]) (((DataBufferByte)(Utils.grayscale(renderer.getImage()).getRaster().getDataBuffer())).getData());
//Object image = Convert.toBidimensional(arr, renderer.getImage().getWidth(), renderer.getImage().getHeight());
//getController().getDataManager().setDataset("/image", image);
elog("ScreenPanel Snapshot", "Data file: " + getController().getExecutionContext().getPath(), new String[]{snapshotFile});
//elog("ScreenPanel Snapshot", "Data file: " + getController().getExecutionContext().getPath(), new String[]{snapshotFile});
} catch (Exception ex) {
ex.printStackTrace();
@@ -1755,7 +1756,6 @@ public class ScreenPanel extends Panel {
String setpoint = (String) comboFilter.getSelectedItem();
if (!setpoint.equals(filter.read())) {
filter.write(setpoint);
}
} catch (Exception ex) {
showException(ex);