From f0ec985e5e855f53162940665d316c9507482a2b Mon Sep 17 00:00:00 2001 From: Jordan DeKraker Date: Sun, 22 Dec 2024 11:07:14 -0500 Subject: [PATCH] removed epsilon from warps --- hippunfold/workflow/rules/native_surf.smk | 8 ++++++++ hippunfold/workflow/scripts/create_warps.py | 17 ----------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/hippunfold/workflow/rules/native_surf.smk b/hippunfold/workflow/rules/native_surf.smk index 63288089..1052c6ab 100644 --- a/hippunfold/workflow/rules/native_surf.smk +++ b/hippunfold/workflow/rules/native_surf.smk @@ -411,6 +411,8 @@ rule compute_halfthick_mask: ), group: "subj" + container: + config["singularity"]["autotop"] shell: "c3d {input.coords} -threshold {params.threshold_tofrom} 1 0 {input.mask} -multiply -o {output}" @@ -454,6 +456,8 @@ rule register_midthickness: ), group: "subj" + container: + config["singularity"]["autotop"] shell: "greedy -d 3 -i {input.fixed} {input.moving} -n 30 -o {output.warp}" @@ -508,6 +512,8 @@ rule apply_halfsurf_warp_to_img: ), group: "subj" + container: + config["singularity"]["autotop"] shell: "greedy -d 3 -rf {input.fixed} -rm {input.moving} {output.warped} -r {input.warp} " @@ -541,6 +547,8 @@ rule convert_warp_from_itk_to_world: ), group: "subj" + container: + config["singularity"]["autotop"] shell: "wb_command -convert-warpfield -from-itk {input} -to-world {output}" diff --git a/hippunfold/workflow/scripts/create_warps.py b/hippunfold/workflow/scripts/create_warps.py index 84664d89..cc6f566e 100644 --- a/hippunfold/workflow/scripts/create_warps.py +++ b/hippunfold/workflow/scripts/create_warps.py @@ -159,23 +159,6 @@ def summary(name, array): + (np.random.rand(coord_flat_ap.shape[0]) - 0.5) * 1e-6, ) -# get unfolded grid (from 0 to 1, not world coords), using meshgrid: -# note: indexing='ij' to swap the ordering of x and y -epsilon = snakemake.params.epsilon -(unfold_gx, unfold_gy, unfold_gz) = np.meshgrid( - np.linspace( - 0 + float(epsilon[0]), unfold_dims[0] - float(epsilon[0]), unfold_dims[0] - ), - np.linspace( - 0 + float(epsilon[1]), unfold_dims[1] - float(epsilon[1]), unfold_dims[1] - ), - np.linspace( - 0 + float(epsilon[2]), unfold_dims[2] - float(epsilon[2]), unfold_dims[2] - ), - indexing="ij", -) -summary("points", points) - # perform the interpolation