summaryrefslogtreecommitdiff
path: root/examples/plotInteractiveImageROI.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/plotInteractiveImageROI.py')
-rw-r--r--examples/plotInteractiveImageROI.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/plotInteractiveImageROI.py b/examples/plotInteractiveImageROI.py
index e06db89..8a4019f 100644
--- a/examples/plotInteractiveImageROI.py
+++ b/examples/plotInteractiveImageROI.py
@@ -2,7 +2,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 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
@@ -71,13 +71,12 @@ roiManager.setColor('pink') # Set the color of ROI
# Set the name of each created region of interest
def updateAddedRegionOfInterest(roi):
"""Called for each added region of interest: set the name"""
- if roi.getLabel() == '':
- roi.setLabel('ROI %d' % len(roiManager.getRois()))
+ if roi.getName() == '':
+ roi.setName('ROI %d' % len(roiManager.getRois()))
if isinstance(roi, LineMixIn):
roi.setLineWidth(2)
roi.setLineStyle('--')
if isinstance(roi, SymbolMixIn):
- roi.setSymbol('o')
roi.setSymbolSize(5)
@@ -86,7 +85,7 @@ roiManager.sigRoiAdded.connect(updateAddedRegionOfInterest)
# Add a rectangular region of interest
roi = RectangleROI()
roi.setGeometry(origin=(50, 50), size=(200, 200))
-roi.setLabel('Initial ROI')
+roi.setName('Initial ROI')
roiManager.addRoi(roi)
# Create the table widget displaying