Skip to content

Commit

Permalink
Merge pull request #548 from ANTsX/kk_bids_labels
Browse files Browse the repository at this point in the history
ENH: Support different segmentation labels in kelly_kapowski

As in KellyKapowski, accept labels other than 2 and 3 to represent GM and WM
  • Loading branch information
cookpa authored Feb 21, 2024
2 parents cc5cd84 + 90d08b3 commit 2870928
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ants/segmentation/kelly_kapowski.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .. import utils


def kelly_kapowski(s, g, w, its=45, r=0.025, m=1.5, **kwargs):
def kelly_kapowski(s, g, w, its=45, r=0.025, m=1.5, gm_label=2, wm_label=3, **kwargs):
"""
Compute cortical thickness using the DiReCT algorithm.
Expand Down Expand Up @@ -36,6 +36,12 @@ def kelly_kapowski(s, g, w, its=45, r=0.025, m=1.5, **kwargs):
m : scalar
gradient field smoothing parameter
gm_label : integer
label for gray matter in the segmentation image
wm_label : integer
label for white matter in the segmentation image
kwargs : keyword arguments
anything else, see KellyKapowski help in ANTs
Expand All @@ -60,7 +66,7 @@ def kelly_kapowski(s, g, w, its=45, r=0.025, m=1.5, **kwargs):
d = s.dimension
outimg = g.clone()
kellargs = {'d': d,
's': s,
's': "[{},{},{}]".format(utils.get_pointer_string(s),gm_label,wm_label),
'g': g,
'w': w,
'c': "[{}]".format(its),
Expand Down

0 comments on commit 2870928

Please sign in to comment.