Skip to content

Commit

Permalink
cropseg to manualseg
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan DeKraker committed Dec 12, 2024
1 parent a95ee40 commit 48f8f5d
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ jobs:
run: |
poetry run hippunfold test_data/bids_singleT2w_longitudinal test_out participant -np --modality T2w
- name: Test cropseg bids, with path override
- name: Test manualseg bids, with path override
run: |
poetry run hippunfold test_data/data_cropseg test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg/sub-{subject}_hemi-{hemi}_dseg.nii.gz
poetry run hippunfold test_data/bids_manualseg test_out participant -np --modality manualseg --path_manualseg test_data/bids_manualseg/sub-{subject}_hemi-{hemi}_dseg.nii.gz
- name: Test cropseg bids, one hemisphere hemi
- name: Test manualseg bids, one hemisphere hemi
run: |
poetry run hippunfold test_data/data_cropseg_1hemi test_out participant -np --modality cropseg --hemi L
poetry run hippunfold test_data/bids_manualseg_1hemi test_out participant -np --modality manualseg --hemi L
- name: Test T2w with T1w template registration
run: |
Expand Down
6 changes: 3 additions & 3 deletions hippunfold/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pybids_inputs:
- acquisition
- run

cropseg:
manualseg:
filters:
suffix: 'dseg'
extension: '.nii.gz'
Expand All @@ -88,13 +88,13 @@ pybids_inputs:
parse_args:

--modality:
help: 'Type of image to run hippunfold on. For manual segmentations, use cropseg and be sure to match the label scheme applied in the look up table (lut) online. For best performance, please also make sure the input is approximately aligned to the template space, with hemi-L|R in the name. (default: %(default)s)'
help: 'Type of image to run hippunfold on. For manualseg and be sure to match the label scheme applied in the look up table (lut) online. For best performance, please also make sure the input is approximately aligned to the template space, with separate hemi-L|R in the name(s). (default: %(default)s)'
required: True
choices:
- T1w
- T2w
- hippb500
- cropseg
- manualseg


--template:
Expand Down
6 changes: 3 additions & 3 deletions hippunfold/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (
limit_to_list.add("T2w")
if (
config["modality"] == "hippb500"
or config["modality"] == "cropseg"
or config["modality"] == "manualseg"
or "corobl" in config["output_spaces"]
):
ref_spaces.append("corobl")
Expand Down Expand Up @@ -111,9 +111,9 @@ if "T1w" in limit_to_list:


# include rules only as they are needed..
if config["modality"] == "cropseg":
if config["modality"] == "manualseg":

include: "rules/preproc_cropseg.smk"
include: "rules/preproc_manualseg.smk"

else:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

rule import_cropseg_to_corobl:
rule import_manualseg_to_corobl:
input:
in_img=partial(get_single_bids_input, component="cropseg"),
in_img=partial(get_single_bids_input, component="manualseg"),
template_dir=Path(download_dir) / "template" / config["template"],
params:
std_to_cor=lambda wildcards: config["template_files"][config["template"]][
Expand Down
2 changes: 1 addition & 1 deletion hippunfold/workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_bg_img_for_subfield_qc(wildcards):
hemi="{hemi}",
**inputs.subj_wildcards,
)
elif config["modality"] == "cropseg":
elif config["modality"] == "manualseg":
# blank image as bg
return bids(
root=work,
Expand Down
4 changes: 2 additions & 2 deletions hippunfold/workflow/rules/shape_inject.smk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def flipped(wildcards):


def get_input_for_shape_inject(wildcards):
if config["modality"] == "cropseg":
if config["modality"] == "manualseg":
seg = bids(
root=work,
datatype="anat",
Expand All @@ -55,7 +55,7 @@ def get_input_for_shape_inject(wildcards):


def get_input_splitseg_for_shape_inject(wildcards):
if config["modality"] == "cropseg":
if config["modality"] == "manualseg":
seg = bids(
root=work,
datatype="anat",
Expand Down

0 comments on commit 48f8f5d

Please sign in to comment.