Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c8c8940
start allowing mixed bundle defs
36000 Jan 27, 2026
2dac434
finish up wmgmi seeding changes
36000 Jan 28, 2026
2538e39
more mixed ROI fixes
36000 Jan 28, 2026
7ddab0f
BFs
36000 Jan 28, 2026
475d9ae
return to setting logging to info
36000 Jan 28, 2026
e7f2d67
minor docs fixes from copilot
36000 Jan 28, 2026
8afa112
toy with vof
36000 Jan 29, 2026
422b065
much needed speedups in bundle recognition
36000 Jan 29, 2026
9e2d9b1
tighter node thresh
36000 Jan 30, 2026
90834a0
bring back parietal endpoint ROIs
36000 Jan 30, 2026
84d2e18
Add projection to node threshold
36000 Feb 2, 2026
348d2c2
for large tractographies, this 5 percent rule may be necessary
36000 Feb 2, 2026
0c6c93e
add exclude ROI to pAF
36000 Feb 2, 2026
34ac0f4
update montage code
36000 Feb 3, 2026
bd0b0f9
fix participant montage
36000 Feb 4, 2026
24026e5
improve participant montage
36000 Feb 4, 2026
1954cc5
More participant montage improvements
36000 Feb 4, 2026
4f834fc
add more options to p montage
36000 Feb 4, 2026
6d71f3b
remove warnings from segmentedsft
36000 Feb 6, 2026
5f0b277
bf
36000 Feb 9, 2026
564ef4f
viz bug fix
36000 Feb 9, 2026
3637ee1
further restrict pAF
36000 Feb 9, 2026
bacc2c9
try more constrained pAF/ARC defs
36000 Feb 9, 2026
df0e545
try this
36000 Feb 9, 2026
5c8c860
tighten ILF constraint
36000 Feb 9, 2026
0bc7704
solve pAF issues with new exclusion ROI
36000 Feb 9, 2026
f91b45b
return to strict VOF seg
36000 Feb 9, 2026
a8e5cbf
return to stricter cleaning
36000 Feb 10, 2026
db6c583
cleaning by other core requires higher levels of precision
36000 Feb 10, 2026
13d016b
bf
36000 Feb 10, 2026
f2b9f5f
maybe we can do this after clustering
36000 Feb 10, 2026
6db5c58
Major registration overhaul
36000 Feb 11, 2026
2dd6049
the transform points direction is opposite for some reason
36000 Feb 11, 2026
b1878b1
verfified
36000 Feb 11, 2026
d9f62c1
this should be not the inverse
36000 Feb 11, 2026
59fea76
add ROI transformation fix
36000 Feb 12, 2026
258b492
cleanup some minor bugs from tests
36000 Feb 12, 2026
c56819b
add documentation and tests for mixed bundle definitions
36000 Feb 12, 2026
eccf402
actually transform points / transform inverse points makes sense
36000 Feb 12, 2026
28af578
BFs
36000 Feb 12, 2026
3148aa1
BFs
36000 Feb 12, 2026
3708393
fix roi dist priority
36000 Feb 12, 2026
0a3a0cc
tweaks
36000 Feb 12, 2026
4351316
small BF
36000 Feb 12, 2026
a690949
put this back
36000 Feb 12, 2026
57fe0a7
implement moving streamlines with new mapping system
36000 Feb 14, 2026
f18713a
add ORG VOF subclusters
36000 Feb 14, 2026
2e21c5b
put this back
36000 Feb 14, 2026
aa4ac6e
fix up reco
36000 Feb 15, 2026
e6dbda8
color new bundles
36000 Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[codespell]
skip = [setup.cfg]
ignore-words-list = Reson, DNE, ACI, FPT, sagital, saggital, abd, Joo, Mapp, Commun, vor, Claus
ignore-words-list = Reson, DNE, ACI, FPT, sagital, saggital, abd, Joo, Mapp, Commun, vor, Claus, coo
71 changes: 71 additions & 0 deletions AFQ/_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import math

import numpy as np
from dipy.align import vector_fields as vfu
from dipy.align.imwarp import DiffeomorphicMap, mult_aff
from dipy.data import default_sphere
from dipy.reconst.gqi import squared_radial_component
from dipy.tracking.streamline import set_number_of_points
Expand All @@ -12,6 +14,75 @@
logger = logging.getLogger("AFQ")


def get_simplified_transform(self):
"""Constructs a simplified version of this Diffeomorhic Map

The simplified version incorporates the pre-align transform, as well as
the domain and codomain affine transforms into the displacement field.
The resulting transformation may be regarded as operating on the
image spaces given by the domain and codomain discretization. As a
result, self.prealign, self.disp_grid2world, self.domain_grid2world and
self.codomain affine will be None (denoting Identity) in the resulting
diffeomorphic map.
"""
if self.dim == 2:
simplify_f = vfu.simplify_warp_function_2d
else:
simplify_f = vfu.simplify_warp_function_3d
# Simplify the forward transform
D = self.domain_grid2world
P = self.prealign
Rinv = self.disp_world2grid
Cinv = self.codomain_world2grid

# this is the matrix which we need to multiply the voxel coordinates
# to interpolate on the forward displacement field ("in"side the
# 'forward' brackets in the expression above)
affine_idx_in = mult_aff(Rinv, mult_aff(P, D))

# this is the matrix which we need to multiply the voxel coordinates
# to add to the displacement ("out"side the 'forward' brackets in the
# expression above)
affine_idx_out = mult_aff(Cinv, mult_aff(P, D))

# this is the matrix which we need to multiply the displacement vector
# prior to adding to the transformed input point
affine_disp = Cinv

new_forward = simplify_f(
self.forward, affine_idx_in, affine_idx_out, affine_disp, self.domain_shape
)

# Simplify the backward transform
C = self.codomain_grid2world
Pinv = self.prealign_inv
Dinv = self.domain_world2grid

affine_idx_in = mult_aff(Rinv, C)
affine_idx_out = mult_aff(Dinv, mult_aff(Pinv, C))
affine_disp = mult_aff(Dinv, Pinv)
new_backward = simplify_f(
self.backward,
affine_idx_in,
affine_idx_out,
affine_disp,
self.codomain_shape,
)
simplified = DiffeomorphicMap(
dim=self.dim,
disp_shape=self.disp_shape,
disp_grid2world=None,
domain_shape=self.domain_shape,
domain_grid2world=None,
codomain_shape=self.codomain_shape,
codomain_grid2world=None,
prealign=None,
)
simplified.forward = new_forward
simplified.backward = new_backward
return simplified


def gwi_odf(gqmodel, data):
gqi_vector = np.real(
squared_radial_component(
Expand Down
Loading
Loading