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
f48f139b
Commit
f48f139b
authored
2 years ago
by
Harry Carey
Browse files
Options
Downloads
Patches
Plain Diff
restructured package
parent
bb9c7c30
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PyNutil/PyNutil.py
+2
-1
2 additions, 1 deletion
PyNutil/PyNutil.py
workflows/basic_workflow.py
+5
-1
5 additions, 1 deletion
workflows/basic_workflow.py
with
7 additions
and
2 deletions
PyNutil.py
→
PyNutil/
PyNutil.py
+
2
−
1
View file @
f48f139b
...
...
@@ -154,7 +154,7 @@ def WritePointsToMeshview(points, pointNames, filename, infoFile):
WritePoints
(
regionDict
,
filename
,
infoFile
)
def
labelPoints
(
points
,
label_volume
,
scale_factor
=
1
):
"""
this function takes a list of points and assigns them to a region based on the regionVolume.
"""
this function takes a list of points and assigns them to a region based on the regionVolume.
These regions will just be the values in the regionVolume at the points.
it returns a dictionary with the region as the key and the points as the value
"""
#first convert the points to 3 columns
...
...
@@ -169,3 +169,4 @@ def labelPoints(points, label_volume, scale_factor=1):
#get the label value for each point
labels
=
label_volume
[
x
,
y
,
z
]
return
labels
This diff is collapsed.
Click to expand it.
basic_workflow.py
→
workflows/
basic_workflow.py
+
5
−
1
View file @
f48f139b
...
...
@@ -2,8 +2,12 @@
import
pandas
as
pd
#nrrd just lets us open nrrd files
import
nrrd
#this is a hack to let us import as if we are in the parent directory
import
sys
sys
.
path
.
append
(
'
..
'
)
#import our function for converting a folder of segmentations to points
from
PyNutil
import
FolderToAtlasSpace
,
labelPoints
,
WritePointsToMeshview
from
PyNutil
.PyNutil
import
FolderToAtlasSpace
,
labelPoints
,
WritePointsToMeshview
segmentation_folder
=
"
test_data/oneSection15/
"
...
...
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