diff --git a/config/config.properties b/config/config.properties index 8120a34..a554305 100755 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Mon Aug 08 11:50:49 CEST 2022 +#Thu Jan 26 14:35:03 CET 2023 imageSourcesFile={config}/imaging.properties autoSaveScanData=true simulation=false @@ -53,4 +53,5 @@ versionTrackingLogin={context}/svcusr-hlapp_robot noBytecodeFiles=false versionTrackingRemote=git@git.psi.ch\:pshell_config/x11ma.git dataProvider=txt +dataScanLazyTableCreation=false saveCommandStatistics=false diff --git a/config/settings.properties b/config/settings.properties index 77eca13..c96d8e3 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,4 +1,4 @@ -#Thu Dec 22 16:41:53 CET 2022 +#Thu Jan 26 14:35:28 CET 2023 HARMONIC_ID_1=1 RSYNC_USER= CFF=2.25 diff --git a/devices/image.properties b/devices/image.properties index 22b3d86..9ae51e1 100644 --- a/devices/image.properties +++ b/devices/image.properties @@ -1,4 +1,4 @@ -#Thu Dec 22 10:11:40 CET 2022 +#Fri Dec 23 22:39:00 CET 2022 spatialCalOffsetY=NaN spatialCalOffsetX=NaN colormapLogarithmic=false @@ -6,7 +6,7 @@ scale=1.0 grayscale=false spatialCalScaleX=NaN spatialCalScaleY=NaN -colormapMax=50.0 +colormapMax=20.0 rescaleOffset=0.0 roiWidth=-1 colormap=Grayscale @@ -19,7 +19,7 @@ spatialCalUnits=null flipVertically=false roiHeight=-1 flipHorizontally=false -colormapAutomatic=true +colormapAutomatic=false roiY=0 roiX=0 transpose=false diff --git a/plugins/Imaging.form b/plugins/Imaging.form index 24019a1..e9d7584 100644 --- a/plugins/Imaging.form +++ b/plugins/Imaging.form @@ -322,54 +322,61 @@ - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/Imaging.java b/plugins/Imaging.java index 39850a8..75c542a 100644 --- a/plugins/Imaging.java +++ b/plugins/Imaging.java @@ -96,6 +96,9 @@ public class Imaging extends Panel { ov.setMovable(true); renderer.addOverlay(ov); } + if (checkMeasurements.isSelected()){ + checkMeasurementsActionPerformed(null); + } } finally { updateButtons(); } @@ -663,7 +666,16 @@ public class Imaging extends Panel { private void buttonRoiSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRoiSetActionPerformed try { - Rectangle roi = new Rectangle(0,0,Integer.valueOf(spinnerSize.getValue().toString()),Integer.valueOf(spinnerSize.getValue().toString())); + int x=0; + int y=0; + int width = Integer.valueOf(spinnerSize.getValue().toString()); + int height = Integer.valueOf(spinnerSize.getValue().toString()); + try{ + x = Math.max((renderer.getImage().getWidth() - width) / 2, 0); + y = Math.max((renderer.getImage().getHeight() - height) / 2, 0); + } catch(Exception ex){ + } + Rectangle roi = new Rectangle(x,y, width, height); setRoi(roi); } catch (Exception ex) { showException(ex); diff --git a/script/local.py b/script/local.py index a4f45da..093369e 100644 --- a/script/local.py +++ b/script/local.py @@ -578,6 +578,11 @@ class MeasurementsFilter(Filter): for measurement in self.measurements: val = get_measurement(ip,measurement) msg = msg + "%s = %1.4f\n" % (measurement,val) + if IMAGING_ROI is not None: + s=ip.crop([Roi(IMAGING_ROI)])[0] + for measurement in self.measurements: + val = get_measurement(s,measurement) + msg = msg + "ROI %s = %1.4f\n" % (measurement,val) self.overlay.update(msg) except: self.overlay.update(str(sys.exc_info()[1])) @@ -600,7 +605,7 @@ class MeasurementsFilter(Filter): filter_measurements = None -def start_measurements(measurements=["StdDev"], source = None, renderer=None): +def start_measurements(measurements=["StdDev", "Mean"], source = None, renderer=None): global filter_measurements if source is None: source = image