Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OnlineMID
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
dataAnalysis
OnlineMID
Commits
9cf22eb9
Commit
9cf22eb9
authored
1 week ago
by
Jakobsen, Mads Bregenholt
Browse files
Options
Downloads
Patches
Plain Diff
debugging
parent
6c253ec1
Loading
Loading
No related merge requests found
Pipeline
#167657
passed
1 week ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_package/src/onlinemid/roi/roi.py
+4
-4
4 additions, 4 deletions
python_package/src/onlinemid/roi/roi.py
with
4 additions
and
4 deletions
python_package/src/onlinemid/roi/roi.py
+
4
−
4
View file @
9cf22eb9
...
@@ -34,7 +34,7 @@ def make_onlineroi_from_roi_array(roi_array):
...
@@ -34,7 +34,7 @@ def make_onlineroi_from_roi_array(roi_array):
index
+=
length
index
+=
length
else
:
else
:
index
+=
1
index
+=
1
return
compressed_data
return
compressed_data
.
get
()
online_roi_data
=
dict
()
online_roi_data
=
dict
()
for
roi_nr
in
range
(
num_rois
):
for
roi_nr
in
range
(
num_rois
):
...
@@ -44,14 +44,14 @@ def make_onlineroi_from_roi_array(roi_array):
...
@@ -44,14 +44,14 @@ def make_onlineroi_from_roi_array(roi_array):
# reshape this online_roi_data into a np array.
# reshape this online_roi_data into a np array.
online_roi_data_max_length
=
0
online_roi_data_max_length
=
0
for
key
,
online_roi_data
in
online_roi_data
.
values
():
for
key
,
online_roi_data
in
online_roi_data
.
values
():
this_size
=
online_roi_data
.
get_
size
()
this_size
=
online_roi_data
.
size
if
this_size
>
online_roi_data_max_length
:
if
this_size
>
online_roi_data_max_length
:
online_roi_data_max_length
=
this_size
online_roi_data_max_length
=
this_size
online_roi
=
np
.
zeros
(
shape
=
(
num_rois
,
online_roi_data_max_length
),
dtype
=
np
.
uint64
)
online_roi
=
np
.
zeros
(
shape
=
(
num_rois
,
online_roi_data_max_length
),
dtype
=
np
.
uint64
)
for
key
,
online_roi_data
in
online_roi_data
.
values
():
for
key
,
online_roi_data
in
online_roi_data
.
values
():
this_size
=
online_roi_data
.
get_
size
()
this_size
=
online_roi_data
.
size
online_roi
[
int
(
key
),:
this_size
]
=
online_roi_data
.
get
()
online_roi
[
int
(
key
),:
this_size
]
=
online_roi_data
return
online_roi
return
online_roi
...
...
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