From cca2f30404a991c131d01a1d3dd55c9a05172283 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Fri, 9 Feb 2024 09:43:04 +0100 Subject: [PATCH] Hotfix wrap afni iso surface on ct mesh + nprocs for cenir petra (#13) * function=wrap_afni_IsoSurface * n_procs 1 --- .github/workflows/build_on_prerelease.yml | 21 +++++++-------------- Dockerfile_github_nomcr | 1 - skullTo3d/_version.py | 2 +- skullTo3d/pipelines/skull_pipe.py | 8 +++----- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build_on_prerelease.yml b/.github/workflows/build_on_prerelease.yml index 5886518..3fedf1f 100644 --- a/.github/workflows/build_on_prerelease.yml +++ b/.github/workflows/build_on_prerelease.yml @@ -96,9 +96,7 @@ jobs: - name: Running all test pipelines (ANTS cenir macaque petra) run: | - - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest - segment_skull -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results @@ -107,7 +105,7 @@ jobs: ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results/derivatives/macapype_crop_aladin_ants_skull_t1_petra_brain_t1_t2/sub-Magneto/anat - name: Cleaning dataset - run: + run: | sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results/derivatives/macapype_crop_aladin_ants_skull_t1_petra_brain_t1_t2 sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/result/macapype_crop_aladin_ants_skull_t1_petra_brain_t1_t2 @@ -145,8 +143,7 @@ jobs: - name: Running all test pipelines (ANTS cerimed macaque CT) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest - segment_skull -data /data/cerimed-macaque-ct -out /datat/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-macaque-ct -out /datat/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results @@ -155,7 +152,7 @@ jobs: ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results/derivatives/macapype_crop_aladin_ants_skull_t1_CT_brain_t1_t2/sub-Marvin/ses-01/anat - name: Cleaning dataset - run: + run: | sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results/derivatives/macapype_crop_aladin_ants_skull_t1_CT_brain_t1_t2 sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/result/macapype_crop_aladin_ants_skull_t1_CT_brain_t1_t2 @@ -191,13 +188,9 @@ jobs: echo "" - - name: Running all test pipelines (ANTS cerimed macaque CT) + - name: Running all test pipelines (ANTS cerimed marmo petra) run: | - - - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest - segment_skull -data /data/cerimed-marmo-petra -out /data/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad - + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-marmo-petra -out /data/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results @@ -207,7 +200,7 @@ jobs: - name: Cleaning dataset - run: + run: | sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results/derivatives/macapype_crop_aladin_ants_skull_t1_petra_brain_t1_t2 sudo rm -rf /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/result/macapype_crop_aladin_ants_skull_t1_petra_brain_t1_t2 diff --git a/Dockerfile_github_nomcr b/Dockerfile_github_nomcr index cbdee6b..5883c89 100644 --- a/Dockerfile_github_nomcr +++ b/Dockerfile_github_nomcr @@ -19,7 +19,6 @@ MAINTAINER David Meunier "david.meunier@univ-amu.fr" ############################################# install skullTo3d -ADD https://api.github.com/repos/macatools/skullTo3d/git/refs/heads/main version.json WORKDIR /opt/packages/ RUN git clone https://github.com/macatools/skullTo3d.git diff --git a/skullTo3d/_version.py b/skullTo3d/_version.py index 8e72144..4acdf66 100644 --- a/skullTo3d/_version.py +++ b/skullTo3d/_version.py @@ -1,2 +1,2 @@ -__version__ = '0.0.1-rc9' +__version__ = '0.0.1-rc11' diff --git a/skullTo3d/pipelines/skull_pipe.py b/skullTo3d/pipelines/skull_pipe.py index fa6a85e..c49823b 100644 --- a/skullTo3d/pipelines/skull_pipe.py +++ b/skullTo3d/pipelines/skull_pipe.py @@ -24,8 +24,7 @@ from macapype.nodes.prepare import average_align -from macapype.nodes.surface import (keep_gcc, - wrap_nii2mesh_old, wrap_afni_IsoSurface) +from macapype.nodes.surface import (keep_gcc, wrap_afni_IsoSurface) from skullTo3d.nodes.skull import ( mask_auto_img) @@ -441,7 +440,7 @@ def create_skull_ct_pipe(name="skull_ct_pipe", params={}): mesh_ct_skull = pe.Node( interface=niu.Function(input_names=["nii_file"], output_names=["stl_file"], - function=wrap_nii2mesh_old), + function=wrap_afni_IsoSurface), name="mesh_ct_skull") skull_ct_pipe.connect(ct_skull_erode, "out_file", @@ -773,7 +772,6 @@ def create_skull_petra_pipe(name="skull_petra_pipe", params={}): mesh_petra_skull = pe.Node( interface=niu.Function(input_names=["nii_file"], output_names=["stl_file"], - # function=wrap_nii2mesh_old), function=wrap_afni_IsoSurface), name="mesh_petra_skull") @@ -806,7 +804,7 @@ def create_skull_petra_pipe(name="skull_petra_pipe", params={}): mesh_robustpetra_skull = pe.Node( interface=niu.Function(input_names=["nii_file"], output_names=["stl_file"], - function=wrap_nii2mesh_old), + function=wrap_afni_IsoSurface), name="mesh_robustpetra_skull") skull_petra_pipe.connect(petra_skull_clean, "gcc_nii_file",