Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyNutil
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Harry Carey
PyNutil
Commits
300429c4
Commit
300429c4
authored
2 years ago
by
Harry Carey
Browse files
Options
Downloads
Patches
Plain Diff
moved build_quantifier logic into __init__
parent
07264a86
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PyNutil/main.py
+1
-2
1 addition, 2 deletions
PyNutil/main.py
testOOP.py
+1
-1
1 addition, 1 deletion
testOOP.py
with
2 additions
and
3 deletions
PyNutil/main.py
+
1
−
2
View file @
300429c4
...
@@ -44,8 +44,6 @@ class PyNutil:
...
@@ -44,8 +44,6 @@ class PyNutil:
self
.
colour
=
colour
self
.
colour
=
colour
self
.
atlas
=
volume_path
self
.
atlas
=
volume_path
# load the metadata json as well as the path to stored data files
# load the metadata json as well as the path to stored data files
def
build_quantifier
(
self
):
# this could potentially be moved into init
# this could potentially be moved into init
atlas_root_path
=
self
.
config
[
"
annotation_volume_directory
"
]
atlas_root_path
=
self
.
config
[
"
annotation_volume_directory
"
]
current_atlas_path
=
self
.
config
[
"
annotation_volumes
"
][
self
.
atlas
][
"
volume
"
]
current_atlas_path
=
self
.
config
[
"
annotation_volumes
"
][
self
.
atlas
][
"
volume
"
]
...
@@ -59,6 +57,7 @@ class PyNutil:
...
@@ -59,6 +57,7 @@ class PyNutil:
self
.
atlas_labels
=
pd
.
read_csv
(
atlas_root_path
+
atlas_label_path
)
self
.
atlas_labels
=
pd
.
read_csv
(
atlas_root_path
+
atlas_label_path
)
print
(
"
atlas labels loaded ✅
"
)
print
(
"
atlas labels loaded ✅
"
)
def
get_coordinates
(
self
,
nonLinear
=
True
,
method
=
"
all
"
):
def
get_coordinates
(
self
,
nonLinear
=
True
,
method
=
"
all
"
):
if
not
hasattr
(
self
,
"
atlas_volume
"
):
if
not
hasattr
(
self
,
"
atlas_volume
"
):
raise
ValueError
(
raise
ValueError
(
...
...
This diff is collapsed.
Click to expand it.
testOOP.py
+
1
−
1
View file @
300429c4
from
PyNutil
import
PyNutil
from
PyNutil
import
PyNutil
pnt
=
PyNutil
(
settings_file
=
r
"
test/test4_2017.json
"
)
pnt
=
PyNutil
(
settings_file
=
r
"
test/test4_2017.json
"
)
pnt
.
build_quantifier
()
#
pnt.build_quantifier()
pnt
.
get_coordinates
()
pnt
.
get_coordinates
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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