From a4188ec326cd00eb4f951065701311ff5416d52c Mon Sep 17 00:00:00 2001 From: anroy1 Date: Sat, 20 Apr 2024 17:51:18 +0000 Subject: [PATCH] Swith transform format to freesurfer standard --- modules/nf-scil/registration/synthregistration/main.nf | 10 +++++----- .../nf-scil/registration/synthregistration/meta.yml | 6 +++--- tests/config/pytest_modules.yml | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/nf-scil/registration/synthregistration/main.nf b/modules/nf-scil/registration/synthregistration/main.nf index 5ceb177e5..1131c3019 100644 --- a/modules/nf-scil/registration/synthregistration/main.nf +++ b/modules/nf-scil/registration/synthregistration/main.nf @@ -11,7 +11,7 @@ process REGISTRATION_SYNTHREGISTRATION { output: tuple val(meta), path("*__output_warped.nii.gz"), emit: warped_image - tuple val(meta), path("*__deform_warp.nii.gz"), emit: deform_transform + tuple val(meta), path("*__deform_warp.mgz"), emit: deform_transform tuple val (meta), path("*__init_warp.lta"), emit: init_transform path "versions.yml" , emit: versions @@ -36,8 +36,8 @@ process REGISTRATION_SYNTHREGISTRATION { export OMP_NUM_THREADS=1 export OPENBLAS_NUM_THREADS=1 - mri_synthmorph $init -g -t ${prefix}__init_warp.lta $moving $fixed - mri_synthmorph $warp -g -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.nii.gz -o ${prefix}__output_warped.nii.gz $moving $fixed + mri_synthmorph $init -t ${prefix}__init_warp.lta $moving $fixed + mri_synthmorph $warp $gpu $smooth $extent $weight -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.mgz -o ${prefix}__output_warped.nii.gz $moving $fixed cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -53,8 +53,8 @@ process REGISTRATION_SYNTHREGISTRATION { mri_synthmorph -h touch ${prefix}__output_warped.nii.gz - touch ${prefix}__deform_warp.nii.gz - touch ${prefix}__init_warp.txt + touch ${prefix}__deform_warp.mgz + touch ${prefix}__init_warp.lta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-scil/registration/synthregistration/meta.yml b/modules/nf-scil/registration/synthregistration/meta.yml index e4ba75452..d51d62086 100644 --- a/modules/nf-scil/registration/synthregistration/meta.yml +++ b/modules/nf-scil/registration/synthregistration/meta.yml @@ -1,6 +1,6 @@ --- name: "registration_synthregistration" -description: Perform registration using SynthMorph from Freesurfer +description: Perform registration using SynthMorph from Freesurfer. Output transforms in Freesurfer format .lta for affine and .mgz for deform, which can be converted for ANTs with respectively lta_convert and mri_warp_convert. keywords: - registration - Brain imaging @@ -43,12 +43,12 @@ output: - init_transform: type: file description: Affine transform for initialization - pattern: "*.{lta}" + pattern: "*.{txt}" - deform_transform: type: file description: Deform transformation - pattern: "*.{nii,.nii.gz}" + pattern: "*.{mgz}" - warped_image: type: file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a29213b08..886db2f0a 100755 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -10,6 +10,7 @@ betcrop/fslbetcrop: bundle/recognize: - modules/nf-scil/bundle/recognize/** - tests/modules/nf-scil/bundle/recognize/** + denoising/mppca: - modules/nf-scil/denoising/mppca/** - tests/modules/nf-scil/denoising/mppca/** @@ -81,6 +82,10 @@ subworkflows/load_test_data: - subworkflows/nf-scil/load_test_data/** - tests/subworkflows/nf-scil/load_test_data/** +testdata/scilpy: + - modules/nf-scil/testdata/scilpy/** + - tests/modules/nf-scil/testdata/scilpy/** + testdata/sizeof: - modules/nf-scil/testdata/sizeof/** - tests/modules/nf-scil/testdata/sizeof/**