summaryrefslogtreecommitdiff
path: root/examples/stackView.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2021-09-07 14:39:36 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2021-09-07 14:39:36 +0200
commitd3194b1a9c4404ba93afac43d97172ab24c57098 (patch)
treea1604130e1401dc1cbd084518ed72869dc92b86f /examples/stackView.py
parentb3bea947efa55d2c0f198b6c6795b3177be27f45 (diff)
New upstream version 0.15.2+dfsg
Diffstat (limited to 'examples/stackView.py')
-rw-r--r--examples/stackView.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/stackView.py b/examples/stackView.py
index 4737251..a4b6e8c 100644
--- a/examples/stackView.py
+++ b/examples/stackView.py
@@ -2,7 +2,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2021 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -47,12 +47,18 @@ dim2_calib = (-5., 15. / 120.)
# sv = StackView()
sv = StackViewMainWindow()
-sv.setColormap("jet", autoscale=True)
sv.setStack(mystack,
calibrations=[dim0_calib, dim1_calib, dim2_calib])
sv.setLabels(["dim0: -10 to 10 (200 samples)",
"dim1: -10 to 5 (150 samples)",
"dim2: -5 to 10 (120 samples)"])
+sv.setColormap("jet")
+sv.scaleColormapRangeToStack()
+
+# Enable use of mask in other tools: colormap autoscale, histogram, profile
+maskToolsWidget = sv.getPlotWidget().getMaskToolsDockWidget().widget()
+maskToolsWidget.setItemMaskUpdated(True)
+
sv.show()
app.exec_()