diff --git a/chameleon-client/src/views/Camera.vue b/chameleon-client/src/views/Camera.vue
index 539f585b1..c07e33784 100644
--- a/chameleon-client/src/views/Camera.vue
+++ b/chameleon-client/src/views/Camera.vue
@@ -21,14 +21,13 @@
-
-
-
+
menu
@@ -38,7 +37,7 @@
-
+
@@ -57,12 +56,6 @@
-
-
-
-
- Duplicate
- Cancel
+ Duplicate
+ Cancel
+
+
+
+
+
+
+ Pipeline Name
+
+
+
+
+
+
+
+ Save
+
+ Cancel
@@ -169,7 +180,7 @@
this.isCameraNameEdit = true;
},
saveCameraNameChange() {
- if (this.cameraNameError === "") {
+ if (this.checkCameraName === "") {
this.handleInput("changeCameraName", this.newCameraName);
this.discardCameraNameChange();
}
@@ -179,15 +190,28 @@
this.newCameraName = "";
},
toPipelineNameChange() {
- this.newPipelineName = this.pipelineList[this.currentPipelineIndex];
- this.isPipelineEdit = true;
+ this.newPipelineName = this.pipelineList[this.currentPipelineIndex - 1];
+ this.isPipelineNameEdit = true;
+ this.namingDialog = true;
+ },
+ toCreatePipeline() {
+ this.newPipelineName = "New Pipeline";
+ this.isPipelineNameEdit = false;
+ this.namingDialog = true;
},
savePipelineNameChange() {
- this.handleInput("changePipelineName", this.newPipelineName);
- this.discardPipelineNameChange();
+ if (this.checkPipelineName === "") {
+ if (this.isPipelineNameEdit) {
+ this.handleInput("changePipelineName", this.newPipelineName);
+ } else {
+ this.handleInput("addNewPipeline", this.newPipelineName);
+ }
+ this.discardPipelineNameChange();
+ }
},
discardPipelineNameChange() {
- this.isPipelineEdit = false;
+ this.namingDialog = false;
+ this.isPipelineNameEdit = false;
this.newPipelineName = "";
},
duplicatePipeline() {
@@ -227,7 +251,8 @@
newCameraName: "",
cameraNameError: "",
// pipeline edit variables
- isPipelineEdit: false,
+ isPipelineNameEdit: false,
+ namingDialog: false,
newPipelineName: "",
duplicateDialog: false,
anotherCamera: false,
@@ -241,11 +266,32 @@
},
computed: {
checkCameraName() {
+ let re = new RegExp('^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$');
if (this.newCameraName !== this.cameraList[this.currentCameraIndex]) {
- for (let cam in this.cameraList) {
- if (this.newCameraName === this.cameraList[cam]) {
- return "Camera by that name already Exists"
+ if (re.test(this.newCameraName)) {
+ for (let cam in this.cameraList) {
+ if (this.newCameraName === this.cameraList[cam]) {
+ return "Camera by that name already Exists"
+ }
}
+ } else {
+ return "Camera name can only contain letters, numbers and spaces"
+ }
+ }
+ return ""
+ },
+ checkPipelineName() {
+ let re = new RegExp('^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$');
+ if (this.newPipelineName !== this.pipelineList[this.currentPipelineIndex - 1] || this.isPipelineNameEdit === false) {
+ if (re.test(this.newPipelineName)) {
+ for (let pipe in this.pipelineList) {
+ if (this.newPipelineName === this.pipelineList[pipe]) {
+ return "A pipeline with this name already exists"
+ }
+ }
+
+ } else {
+ return "Pipeline name can only contain letters, numbers, and spaces"
}
}
return ""
diff --git a/chameleon-client/src/views/CameraViewes/ThresholdTab.vue b/chameleon-client/src/views/CameraViewes/ThresholdTab.vue
index f112da5e4..979236692 100644
--- a/chameleon-client/src/views/CameraViewes/ThresholdTab.vue
+++ b/chameleon-client/src/views/CameraViewes/ThresholdTab.vue
@@ -5,15 +5,15 @@
@input="handleData('saturation')"/>
-
+
colorize
Eye drop
-
+
add
Expand Selection
-
+
remove
Shrink Selection
diff --git a/chameleon-server/src/main/java/com/chameleonvision/vision/pipeline/PipelineManager.java b/chameleon-server/src/main/java/com/chameleonvision/vision/pipeline/PipelineManager.java
index 58cb78a2d..f56b25f68 100644
--- a/chameleon-server/src/main/java/com/chameleonvision/vision/pipeline/PipelineManager.java
+++ b/chameleon-server/src/main/java/com/chameleonvision/vision/pipeline/PipelineManager.java
@@ -163,13 +163,14 @@ public class PipelineManager {
savePipelineConfig(pipeline.settings);
}
- public void addNewPipeline(boolean is3D) {
+ public void addNewPipeline(boolean is3D, String piplineName) {
CVPipeline newPipeline;
if (!is3D) {
newPipeline = new CVPipeline2d();
} else {
newPipeline = new CVPipeline3d();
}
+ newPipeline.settings.nickname = piplineName;
newPipeline.settings.index = pipelines.size();
addPipeline(newPipeline);
}
diff --git a/chameleon-server/src/main/java/com/chameleonvision/web/SocketHandler.java b/chameleon-server/src/main/java/com/chameleonvision/web/SocketHandler.java
index d5884a293..7a2d22a4f 100644
--- a/chameleon-server/src/main/java/com/chameleonvision/web/SocketHandler.java
+++ b/chameleon-server/src/main/java/com/chameleonvision/web/SocketHandler.java
@@ -103,15 +103,18 @@ public class SocketHandler {
sendFullSettings();
break;
}
+ case "addNewPipeline": {
+// HashMap data = (HashMap) entry.getValue();
+ String pipeName = (String) entry.getValue();
+ // TODO: add to UI selection for new 2d/3d
+ boolean is3d = false;
+ currentProcess.pipelineManager.addNewPipeline(is3d, pipeName);
+ sendFullSettings();
+ VisionManager.saveCurrentCameraPipelines();
+ break;
+ }
case "command": {
switch ((String) entry.getValue()) {
- case "addNewPipeline":
- // TODO: add to UI selection for new 2d/3d
- boolean is3d = false;
- currentProcess.pipelineManager.addNewPipeline(is3d);
- sendFullSettings();
- VisionManager.saveCurrentCameraPipelines();
- break;
case "deleteCurrentPipeline":
currentProcess.pipelineManager.deleteCurrentPipeline();
sendFullSettings();
@@ -141,10 +144,10 @@ public class SocketHandler {
switch (entry.getKey()) {//Pre field value set
case "rotationMode": {//Create new CaptureStaticProperties with new width and height, reset crosshair calib
ImageRotationMode oldRot = currentPipeline.settings.rotationMode;
- ImageRotationMode newRot = ImageRotationMode.class.getEnumConstants()[(Integer)entry.getValue()];
+ ImageRotationMode newRot = ImageRotationMode.class.getEnumConstants()[(Integer) entry.getValue()];
CaptureStaticProperties prop = currentCamera.getProperties().getStaticProperties();
int width, height;
- if(oldRot.isRotated()!=newRot.isRotated()){
+ if (oldRot.isRotated() != newRot.isRotated()) {
width = prop.mode.height;
height = prop.mode.width;
//Creates new video mode with new width and height to create new CaptureStaticProperties and applies it