Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
d2c2ec83
Commit
d2c2ec83
authored
3 years ago
by
Joao P C Bertoldo
Browse files
Options
Downloads
Patches
Plain Diff
implement first attempt with shared memory
parent
a715880b
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
Draft: Resolve "py-bkg-rm"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_Python/pydct/orangecontrib/pydct/widgets/remove_zmoving_medians.py
+9
-14
9 additions, 14 deletions
...dct/orangecontrib/pydct/widgets/remove_zmoving_medians.py
with
9 additions
and
14 deletions
zUtil_Python/pydct/orangecontrib/pydct/widgets/remove_zmoving_medians.py
+
9
−
14
View file @
d2c2ec83
...
...
@@ -56,12 +56,11 @@ class RemoveZmovingMedian(OWWidget):
resizing_enabled
=
True
class
Inputs
:
data
=
Input
(
"
data
"
,
ndarray
)
multiprocessing_array
=
Input
(
"
multiprocessing_
array
"
,
_ctypes
.
Array
)
shared_
data
=
Input
(
"
shared_data
"
,
tuple
)
# todo document this properly
# Tuple[nd
array,
Raw
Array
]
class
Outputs
:
data
=
Output
(
"
data
"
,
ndarray
)
multiprocessing_array
=
Output
(
"
multiprocessing_array
"
,
_ctypes
.
Array
)
shared_data
=
Output
(
"
shared_data
"
,
tuple
)
# todo document this properly
backgrounds
=
Output
(
"
backgrounds
"
,
ndarray
)
median_window
=
Setting
(
500
,
schema_only
=
True
)
...
...
@@ -103,14 +102,9 @@ class RemoveZmovingMedian(OWWidget):
self
.
run_button
=
gui
.
button
(
widget
=
self
.
controlArea
,
master
=
self
,
label
=
"
go
"
,
callback
=
self
.
_run
)
self
.
run_button
.
setDisabled
(
True
)
@Inputs.data
def
set_data
(
self
,
data
):
self
.
data
=
data
self
.
_on_input_change
()
@Inputs.multiprocessing_array
def
set_data
(
self
,
multiprocessing_array
):
self
.
multiprocessing_array
=
multiprocessing_array
@Inputs.shared_data
def
set_shared_data
(
self
,
shared_data
):
self
.
data
,
self
.
multiprocessing_array
=
shared_data
self
.
_on_input_change
()
def
_on_input_change
(
self
):
...
...
@@ -167,8 +161,9 @@ class RemoveZmovingMedian(OWWidget):
if
self
.
_thread
.
data_normalized
is
not
None
and
self
.
_thread
.
backgrounds
is
not
None
:
self
.
Outputs
.
data
.
send
(
self
.
_thread
.
data_normalized
)
self
.
Outputs
.
multiprocessing_array
.
send
(
self
.
multiprocessing_array
)
self
.
Outputs
.
shared_data
.
send
(
(
self
.
_thread
.
data_normalized
,
self
.
multiprocessing_array
)
)
self
.
Outputs
.
backgrounds
.
send
(
self
.
_thread
.
backgrounds
)
self
.
information
(
"
done
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment