This commit is contained in:
sfop
2016-09-01 14:38:54 +02:00
parent bfdafa1135
commit 23f0aabfa7
3 changed files with 22 additions and 12 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
#Thu Sep 01 10:08:06 CEST 2016
#Thu Sep 01 10:30:27 CEST 2016
colormap=Temperature
colormapAutomatic=true
colormapMax=2475.851
@@ -6,8 +6,8 @@ colormapMin=2189.861
flipHorizontally=false
flipVertically=false
grayscale=false
imageHeight=1200
imageWidth=1246
imageHeight=784
imageWidth=874
invert=false
rescaleFactor=1.0
rescaleOffset=0.0
@@ -18,8 +18,8 @@ roiY=0
rotation=0.0
rotationCrop=true
scale=1.0
spatialCalOffsetX=-1197.0
spatialCalOffsetY=-1153.0
spatialCalOffsetX=-263.97
spatialCalOffsetY=-302.54
spatialCalScaleX=0.013157894736842105
spatialCalScaleY=0.04
spatialCalUnits=mm
+13 -7
View File
@@ -182,6 +182,7 @@ public class Cameras extends Panel {
try {
if (checkCamtool.isSelected()) {
camera = new Camtool("CurrentCamera", cameraName, false, true);
} else {
camera = new PsiCamera("CurrentCamera", cameraName);
config = (CameraConfig) JsonSerializer.decode(cameraConfigJson, CameraConfig.class);
@@ -210,15 +211,17 @@ public class Cameras extends Panel {
} catch (Exception ex) {
config = null;
showException(ex);
}
camera.initialize();
if (camera instanceof Camtool){
double[] origin = ((Camtool)camera).origin.read();
camera.getConfig().spatialCalOffsetX = origin[0];
camera.getConfig().spatialCalOffsetY = origin[1];
}
camera.getConfig().save();
camera.initialize();
camera.setPolling(500);
camera.setMonitored(true);
camera.getDevice().setMonitored(true);
camera.getDevice().setPolling(500);
camera.setPolling(-500);
//camera.setMonitored(true);
renderer.setDevice(camera);
renderer.setShowReticle(true);
renderer.setAutoScroll(true);
@@ -261,6 +264,7 @@ public class Cameras extends Panel {
final public ChannelInteger channelRun;
final public ChannelInteger channelLatch;
final public ChannelDouble channelTimestamp;
final public ChannelDoubleArray origin;
final public ChannelDouble posX, posY;
final public ChannelDoubleArray profileX, profileY;
final public ChannelIntegerArray shape;
@@ -291,6 +295,7 @@ public class Cameras extends Panel {
profileX = new ChannelDoubleArray(name + " profile x", dataPrefix + "profile.x");
profileY = new ChannelDoubleArray(name + " profile y", dataPrefix + "profile.y");
shape = new ChannelIntegerArray(name + " shape", dataPrefix + (roi ? "roi.output.shape" : "image.shape"));
origin = new ChannelDoubleArray(name + " origin X", roi ? (dataPrefix + "roi.origin_out") : (prefix+"origin"));
bgEnable = new ChannelInteger(name + " bg enable", this.prefix + "pipeline.bg.enabled");
bgCapture = new ChannelInteger(name + " bg capture", this.prefix + "pipeline.bg.capture");
bgCaptureRemain = new ChannelInteger(name + " bg capture remain", this.prefix + "pipeline.bg.capture_remain");
@@ -342,9 +347,10 @@ public class Cameras extends Panel {
profileX.initialize();
profileY.initialize();
shape.initialize();
origin.initialize();
bgEnable.initialize();
bgCapture.initialize();
bgCaptureRemain.initialize();
bgCaptureRemain.initialize();
int[] s = shape.read();
getConfig().imageHeight = s[0];
+4
View File
@@ -20,6 +20,7 @@ import java.util.ArrayList;
final public ChannelInteger channelRun;
final public ChannelInteger channelLatch;
final public ChannelDouble channelTimestamp;
final public ChannelDoubleArray origin;
final public ChannelDouble posX, posY;
final public ChannelDoubleArray profileX, profileY;
final public ChannelIntegerArray shape;
@@ -50,6 +51,8 @@ import java.util.ArrayList;
profileX = new ChannelDoubleArray(name + " profile x", dataPrefix + "profile.x");
profileY = new ChannelDoubleArray(name + " profile y", dataPrefix + "profile.y");
shape = new ChannelIntegerArray(name + " shape", dataPrefix + (roi ? "roi.output.shape" : "image.shape"));
origin = new ChannelDoubleArray(name + " origin X", roi ? (dataPrefix + "roi.origin_out") : (prefix+"origin"));
bgEnable = new ChannelInteger(name + " bg enable", this.prefix + "pipeline.bg.enabled");
bgCapture = new ChannelInteger(name + " bg capture", this.prefix + "pipeline.bg.capture");
bgCaptureRemain = new ChannelInteger(name + " bg capture remain", this.prefix + "pipeline.bg.capture_remain");
@@ -101,6 +104,7 @@ import java.util.ArrayList;
profileX.initialize();
profileY.initialize();
shape.initialize();
origin.initialize();
bgEnable.initialize();
bgCapture.initialize();
bgCaptureRemain.initialize();