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
1474c5fe
Commit
1474c5fe
authored
1 year ago
by
Harry Carey
Browse files
Options
Downloads
Patches
Plain Diff
restructuring and adding comments
parent
f48f139b
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/visualign_deformations.py
+0
-0
0 additions, 0 deletions
PyNutil/visualign_deformations.py
workflows/folder_of_segmentations_to_meshview.py
+8
-5
8 additions, 5 deletions
workflows/folder_of_segmentations_to_meshview.py
with
8 additions
and
5 deletions
V
isu
A
lign
WarpVec
.py
→
PyNutil/v
isu
a
lign
_deformations
.py
+
0
−
0
View file @
1474c5fe
File moved
This diff is collapsed.
Click to expand it.
workflows/
basic_workflo
w.py
→
workflows/
folder_of_segmentations_to_meshvie
w.py
+
8
−
5
View file @
1474c5fe
...
...
@@ -10,14 +10,14 @@ sys.path.append('..')
from
PyNutil.PyNutil
import
FolderToAtlasSpace
,
labelPoints
,
WritePointsToMeshview
segmentation_folder
=
"
test_data/oneSection15/
"
alignment_json
=
"
test_data/C68_nonlinear.json
"
segmentation_folder
=
"
../
test_data/oneSection15/
"
alignment_json
=
"
../
test_data/C68_nonlinear.json
"
#now we can use our function to convert the folder of segmentations to points
points
=
FolderToAtlasSpace
(
segmentation_folder
,
alignment_json
,
pixelID
=
[
255
,
0
,
255
],
nonLinear
=
True
)
#first we need to find the label file for the volume
label_path
=
"
annotation_volumes//allen2022_colours.csv
"
label_path
=
"
../
annotation_volumes//allen2022_colours.csv
"
#then the path to the volume
volume_path
=
"
annotation_volumes//annotation_10_reoriented.nrrd
"
volume_path
=
"
../
annotation_volumes//annotation_10_reoriented.nrrd
"
#read the label file
label_df
=
pd
.
read_csv
(
label_path
)
#read the annotation volume, it also has a header but we don't need it
...
...
@@ -25,4 +25,7 @@ data, header = nrrd.read(volume_path)
#now we can get the labels for each point
labels
=
labelPoints
(
points
,
data
,
scale_factor
=
2.5
)
#save points to a meshview json
WritePointsToMeshview
(
points
,
labels
,
"
outputs/points.json
"
,
label_df
)
WritePointsToMeshview
(
points
,
labels
,
"
../outputs/points.json
"
,
label_df
)
#while we havent added it here it would be good to next quantify the number of cells for each label.
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