From dc6d5e90d743258abe5a5a52f4f91703bc024486 Mon Sep 17 00:00:00 2001 From: MichaelSNelson Date: Wed, 6 Dec 2023 13:57:22 -0600 Subject: [PATCH] Gui update sample name field --- .../executionHistory/executionHistory.bin | Bin 194281 -> 194281 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/7.5.1/fileHashes/fileHashes.bin | Bin 26547 -> 26547 bytes .gradle/7.5.1/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .../qp_scope/functions/QP_scope_GUI.groovy | 18 ++++++++++++------ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gradle/7.5.1/executionHistory/executionHistory.bin b/.gradle/7.5.1/executionHistory/executionHistory.bin index 03ab3343f563aeddd3624c6e17c98d341c9e171d..bb206a49c026e1da83dd67451e6c3936067f94b4 100644 GIT binary patch delta 627 zcmaF)miy&f?hXDPO1VYGRmDYFiDp@exhYxYIcBLDIp)U2l_{wV5a7MJ&?A~nD7sqe z)l=j19NIFa_pRpL=3qQJxiCm{`h0apvB{kNlY|%x7}eLmyTe1uMxDjRjweQk?qnP<7ntay!n-#<7Gs=BDF!i6`wGCn|yKmL;e)d-1 z`0!He5yN#=EQ|~c0y8IHjF#N|J>v8+!tT`FK2eBKn`Jw{3S$HlZP z{z`9XPG{T%cFuO7a|)OQ6uz0?G*H>R?983ptn>9RDNQa6*Pb4m#%Q*^L5q=vQJhI{ z_S@afdQ1F6BVH_&-*u(!5y(;7+GlGsZlA5qlw?ZKIouuFNhYZbV8Cd(xzHn;O{me} z!rqnltWRxR!R_(FC`60#=;Xp6(dqNm8O0`Z`cD$FnlbBOw#mK@a zUd?F6W}WfHMf>4fCiY9y{!aQ0a@4~1+1iZTXKOPhnG$r4kn?u=M5e_(xEulsm(9~> zzhnA_;h5Fd;N-%HN3HLBARK3xP9%2(TKT%MO4x#Dxk ZuMQuZQlJoe98aGp!=$;r<`Yvc3jpgP3c&yX diff --git a/.gradle/7.5.1/executionHistory/executionHistory.lock b/.gradle/7.5.1/executionHistory/executionHistory.lock index 4f2ddb49c3b82a8410ce71ed7307b90fb4d2c473..501519660571fe6db32e95e1a1dd6a894006e1d9 100644 GIT binary patch literal 17 UcmZQ>t|x0-jG1EOd{B}5U&Js_=T3?wvxSP_H;7z-HH*T3ZWq0zDHZD@l{GO7;w zdy@~Qs55WbP(S%~iawC8nk<_Nq8ldrL+Qp;eQuyU&@dp7V3{14rZ)Lu>NACp2d4h> zyS72BW%sQ*-p}6ZP=hx@6x!-dRt$BSteu{s!lXC*?e1p1CH|oiFBZ!0x&l$Skqx3y J*bGSP0RUtts0pG64Ka&Ys+us?WWAcLqeg1k2>WG_}bO zQ=chpYPy&5-sjW%6;Yf_2X09$ff&4JDny~p=gEqpE|ay>Q&g%M&Dg9nzPM;Ve9Ods SY1&_i!o8Cq3WY(=)B^y#cwC$S diff --git a/.gradle/7.5.1/fileHashes/fileHashes.lock b/.gradle/7.5.1/fileHashes/fileHashes.lock index 0cf00597b1dcb7b5d15911803f53c82f960b9c08..cb0ec37267c7cd6206c5235090134a76ed1a044f 100644 GIT binary patch literal 17 VcmZR68Mf5AHhXs*0~j#60su8T1Zn^P literal 17 VcmZR68Mf5AHhXs*0~jz`0su8H1YQ6D diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 834cc701d9bceb1104662e42d4b0ed4ae98d7931..50d97af5346f1964ffc3f4821ff8e6798b81404e 100644 GIT binary patch literal 17 UcmZQJ=$^Oun2^#z1_;Oj050nUCjbBd literal 17 UcmZQJ=$^Oun2^#z1_($4050VOApigX diff --git a/src/main/groovy/qupath/ext/qp_scope/functions/QP_scope_GUI.groovy b/src/main/groovy/qupath/ext/qp_scope/functions/QP_scope_GUI.groovy index d670b9b..a060477 100644 --- a/src/main/groovy/qupath/ext/qp_scope/functions/QP_scope_GUI.groovy +++ b/src/main/groovy/qupath/ext/qp_scope/functions/QP_scope_GUI.groovy @@ -19,9 +19,10 @@ class QP_scope_GUI { static TextField y2Field = new TextField(""); static TextField scanBox = new TextField(""); - // New text fields for Python environment and script path - static TextField virtualEnvField = new TextField("c:/Users/lociuser/miniconda3/envs/spath"); - static TextField pythonScriptField = new TextField("c:/Users/lociuser/pythontest.py"); + // New text fields for Python environment, script path, and sample label + static TextField virtualEnvField = new TextField(""); + static TextField pythonScriptField = new TextField(""); + static TextField sampleLabelField = new TextField(""); // New field for sample label static void createGUI() { // Create the dialog @@ -42,6 +43,7 @@ class QP_scope_GUI { // Handling the response if (result.isPresent() && result.get() == ButtonType.OK) { // Retrieve values from text fields + def sampleLabel = sampleLabelField.getText(); def x1 = x1Field.getText(); def y1 = y1Field.getText(); def x2 = x2Field.getText(); @@ -62,10 +64,10 @@ class QP_scope_GUI { } // Check if any value is empty - if ([x1, y1, x2, y2, virtualEnvPath, pythonScriptPath].any { it == null || it.isEmpty() }) { + if ([sampleLabel, x1, y1, x2, y2, virtualEnvPath, pythonScriptPath].any { it == null || it.isEmpty() }) { Dialogs.showWarningNotification("Warning!", "Incomplete data entered."); } else { - utilityFunctions.runPythonCommand(virtualEnvPath, pythonScriptPath, x1, y1, x2, y2); + utilityFunctions.runPythonCommand(virtualEnvPath, pythonScriptPath, sampleLabel, x1, y1, x2, y2); } } } @@ -75,6 +77,10 @@ class QP_scope_GUI { pane.setHgap(10); pane.setVgap(10); def row = 0; + + // Add new component for Sample Label + addToGrid(pane, new Label('Sample Label:'), sampleLabelField, row++); + // Add existing components to the grid addToGrid(pane, new Label('X1:'), x1Field, row++); addToGrid(pane, new Label('Y1:'), y1Field, row++); @@ -82,7 +88,7 @@ class QP_scope_GUI { addToGrid(pane, new Label('Y2:'), y2Field, row++); addToGrid(pane, new Label('Full bounding box:'), scanBox, row++); - // Add new components for Python environment and script path + // Add components for Python environment and script path addToGrid(pane, new Label('Python Virtual Env Location:'), virtualEnvField, row++); addToGrid(pane, new Label('.py file path:'), pythonScriptField, row++);