Skip to content

Commit

Permalink
fixed bug with atlas coregistration
Browse files Browse the repository at this point in the history
  • Loading branch information
GalKepler committed Nov 12, 2024
1 parent 1da158f commit 2061f6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/kepost/interfaces/utils/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def plot_n_voxels_in_atlas(wholebrain: str, gm_cropped: str):
atlas_name = atlas_name_part[0].replace("_atlas_name_", "")
_, description, region_col, index_col = get_atlas_properties(atlas_name)
df = pd.read_csv(description, index_col=index_col)
wb = nib.load(wholebrain).get_fdata() # type: ignore[attr-defined]
gm = nib.load(gm_cropped).get_fdata() # type: ignore[attr-defined]
wb = nib.load(wholebrain).get_fdata().astype(int) # type: ignore[attr-defined]
gm = nib.load(gm_cropped).get_fdata().astype(int) # type: ignore[attr-defined]
for column, data in zip(["Uncropped", "GM-cropped"], [wb, gm]):
for i, row in df.iterrows():
roi = row[region_col]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def init_coregistration_wf(
)
# run apply transforms on both parcellations, naming them appropriately
apply_transforms_wholebrain = pe.Node(
fsl.ApplyXFM(interp="nearestneighbour", apply_xfm=True, datatype="int"),
fsl.ApplyXFM(interp="nearestneighbour", apply_xfm=True),
name="apply_transforms_wholebrain",
)
apply_transforms_gm_cropped = pe.Node(
fsl.ApplyXFM(interp="nearestneighbour", apply_xfm=True, datatype="int"),
fsl.ApplyXFM(interp="nearestneighbour", apply_xfm=True),
name="apply_transforms_gm_cropped",
)
apply_transforms_t1w = pe.Node(
Expand Down

0 comments on commit 2061f6e

Please sign in to comment.