Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When re-runing with the same atlases, load segmentations #153

Merged
merged 3 commits into from
May 31, 2024
Merged
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions giga_connectome/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def generate_gm_mask_atlas(
subject_mask_nii, subject_mask_dir / target_subject_mask_file_name
)
else:
subject_mask_nii = load_img(target_subject_mask)
subject_mask_nii = load_img(
subject_mask_dir / target_subject_mask_file_name
)

if not target_subject_seg or not target_subject_mask:
# resample if the grey matter mask was not generated
Expand All @@ -85,11 +87,10 @@ def generate_gm_mask_atlas(
)
else:
subject_seg_niis = [
load_img(subject_mask_dir / i)
for i in target_subject_seg_file_names
subject_mask_dir / i for i in target_subject_seg_file_names
]

return subject_mask_nii, subject_seg_niis
return subject_mask_dir / target_subject_mask_file_name, subject_seg_niis


def generate_subject_gm_mask(
Expand Down
Loading