This commit is contained in:
root
2017-12-14 16:35:05 +01:00
parent a2928d0eb3
commit 84ba6b2878
8 changed files with 60 additions and 23 deletions

View File

@@ -123,6 +123,7 @@ public class ScreenPanel extends Panel {
boolean goodRegion;
boolean slicing;
String serverUrl;
String camServerUrl;
String instanceName;
Double getServerDouble(String name) {
@@ -271,6 +272,11 @@ public class ScreenPanel extends Panel {
serverUrl = App.getArgumentValue("srv_url");
}
if (App.hasArgument("cam_srv_url")) {
camServerUrl = App.getArgumentValue("cam_srv_url");
}
if (App.hasArgument("calc")) {
useServerStats = false;
}
@@ -546,7 +552,14 @@ public class ScreenPanel extends Panel {
final Object lockOverlays = new Object();
void manageFit(BufferedImage bi, Data data) {
Overlay[][] fo = ((bi == null) || ((!showFit && !showProfile))) ? null : getFitOverlays(data);
Overlay[][] fo = null;
if ((showFit && showProfile)){
try{
fo=getFitOverlays(data);
} catch (Exception ex){
System.err.println(ex);
}
}
synchronized (lockOverlays) {
fo = (fo == null) ? new Overlay[][]{null, null} : fo;
renderer.updateOverlays(fo[0], profileOv);
@@ -1048,7 +1061,7 @@ public class ScreenPanel extends Panel {
int width = data.getWidth();
PointDouble[] sliceCenters = null;
//Double xCom=null, yCom=null;
if (data != null) {
if (data != null) {
int profileSize = renderer.getProfileSize();
if ((useServerStats) && (server != null)) {
try {
@@ -2815,8 +2828,8 @@ public class ScreenPanel extends Panel {
try {
if (camera != null) {
String cameraConfigJson = null;
if (usingServer) {
String cameraServerUrl = server.getUrl().substring(0, server.getUrl().length() - 1) + "8";
if (usingServer) {
String cameraServerUrl = (camServerUrl==null) ? server.getUrl().substring(0, server.getUrl().length() - 1) + "8": camServerUrl;
try (CameraServer srv = new CameraServer("CamServer", cameraServerUrl)) {
srv.initialize();
//TODO: replace into encodeMultiline