Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
id06workflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
payno
id06workflow
Commits
5e8f4e6a
Commit
5e8f4e6a
authored
Nov 30, 2018
by
payno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[orange add-on][roiselection] add Setting
parent
4b146b4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
orangecontrib/id06workflow/widgets/roiselection.py
orangecontrib/id06workflow/widgets/roiselection.py
+17
-1
No files found.
orangecontrib/id06workflow/widgets/roiselection.py
View file @
5e8f4e6a
...
...
@@ -33,7 +33,7 @@ from silx.gui import qt
from
Orange.canvas.registry.description
import
InputSignal
,
OutputSignal
from
Orange.widgets
import
gui
from
Orange.widgets.widget
import
OWWidget
from
Orange.widgets.settings
import
Setting
from
id06workflow.core.experiment
import
Experiment
from
id06workflow.core.operation.roi
import
RoiOperation
from
id06workflow.gui.roiselection
import
ROIOnStackView
...
...
@@ -63,6 +63,9 @@ class RoiSelectionOW(OWWidget):
resizing_enabled
=
True
compress_signal
=
False
_roi_origin
=
Setting
(
tuple
())
_roi_size
=
Setting
(
tuple
())
def
__init__
(
self
):
super
().
__init__
()
...
...
@@ -83,6 +86,11 @@ class RoiSelectionOW(OWWidget):
# expose API
self
.
setROI
=
self
.
_widget
.
setROI
if
len
(
self
.
_roi_size
)
is
2
:
self
.
_widget
.
getROI
().
setSize
(
size
=
self
.
_roi_size
)
if
len
(
self
.
_roi_origin
)
is
2
:
self
.
_widget
.
getROI
().
setOrigin
(
self
.
_roi_origin
)
def
_process
(
self
,
experiment
):
if
experiment
.
dataset
is
None
or
experiment
.
dataset
.
is_valid
()
is
False
:
_logger
.
warning
(
'cannot process roi selection, need a valid dataset for this'
)
...
...
@@ -116,3 +124,11 @@ class RoiSelectionOW(OWWidget):
else
:
OWWidget
.
accept
(
self
)
# TODO: what can be the image to send to show roi selection (z sum ?)
def
updateProperties
(
self
):
# as dim are named tuple we have to cast them to dict
self
.
_roi_origin
=
tuple
(
self
.
_widget
.
getROI
().
getOrigin
())
self
.
_roi_size
=
tuple
(
self
.
_widget
.
getROI
().
getSize
())
print
(
self
.
_roi_origin
)
print
(
self
.
_roi_size
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment