diff --git a/hippunfold/workflow/rules/native_surf.smk b/hippunfold/workflow/rules/native_surf.smk index 1aa92954..dbbd6354 100644 --- a/hippunfold/workflow/rules/native_surf.smk +++ b/hippunfold/workflow/rules/native_surf.smk @@ -3,7 +3,6 @@ # --- parameters - will put these in config eventually - surf_thresholds = {"inner": 0, "outer": 1, "midthickness": 0.5} # this is for the mapping from inner to outer @@ -247,6 +246,39 @@ rule update_native_mesh_structure: " -surface-secondary-type {params.secondary_type}" +rule smooth_surface: + input: + surf_gii=bids( + root=work, + datatype="surf", + suffix="{surfname}.surf.gii", + space="corobl", + hemi="{hemi}", + label="{label}", + **inputs.subj_wildcards + ), + params: + smoothing_strength=0.8, + smoothing_iterations=10, + output: + surf_gii=bids( + root=work, + datatype="surf", + suffix="{surfname}.surf.gii", + space="corobl", + desc="smoothed", + hemi="{hemi}", + label="{label}", + **inputs.subj_wildcards + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "wb_command -surface-smoothing {input} {params.smoothing_strength} {params.smoothing_iterations} {output}" + + # --- creating unfold surface from native anatomical @@ -654,6 +686,7 @@ rule calculate_curvature_from_surface: datatype="surf", suffix="midthickness.surf.gii", space="corobl", + desc="smoothed", hemi="{hemi}", label="{label}", **inputs.subj_wildcards