[ENH]: Allow ParcelAggregation to apply multiple parcellations at once #131
No reviewers
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer!131
Loading…
Reference in a new issue
No description provided.
Delete branch "fraimondo/issue131"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Are you requiring a new dataset or marker?
Which feature do you want to include?
It is common to compute markers on more than one parcel. However, some markers such as Functional Connectivity need to first extract signals from all the parcels and then compute the pairwise connectivity.
This could be done at the FC marker. However, it is also the case that there might be overlapping voxels (i.e. voxels that are present in both parcellations).
Thus, the solution is to pass several parcellations to
ParcelAggregation. This marker should first merge the parcells into one and then compute the aggregation.However, in case of overlapping voxels, the order of the parcels should matter, as any voxel belonging to more than one parcellation should be placed in the parcellation that was first between the two.
Also, if the parcellations resolution do not match, it should be resamples to the one with the highest resolution.
Here's an example code:
github.com/LeSasse/parcmerge@1aef22665e/parcmerge/utils/parcutils.py (L30)How do you imagine this integrated in junifer?
in
ParcelAggregation.computeDo you have a sample code that implements this outside of junifer?
No response
Anything else to say?
No response
BTW there is one part of it
I did the If/else because in my head it was better to have 1..n labels for the bigger parcellation and then n..m labels for the smaller parcellation, but thinking about it, its probably better/more consistent if the order of labels is also determined by the order that parcellations are handed over in the function parameters similar to the overlap. Otherwise this will likely be confusing.
Codecov Report
100.00% <ø> (ø)95.16% <100.00%> (+0.08%)Flags with carried forward coverage won't be shown. Click here to find out more.
97.84% <100.00%> (+0.49%)93.33% <100.00%> (+0.47%)100.00% <100.00%> (ø)96.38% <100.00%> (+1.47%)100.00% <0.00%> (ø)100.00% <0.00%> (ø)100.00% <0.00%> (ø)100.00% <0.00%> (ø)100.00% <0.00%> (ø)