Skip to content

Commit

Permalink
Switch transform output to fs .nii.gz format
Browse files Browse the repository at this point in the history
  • Loading branch information
anroy1 committed May 14, 2024
1 parent 53e3ad2 commit d009a88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions modules/nf-scil/registration/synthregistration/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ process REGISTRATION_SYNTHREGISTRATION {
input:
tuple val(meta), path(moving), path(fixed)


output:
tuple val(meta), path("*__output_warped.nii.gz"), emit: warped_image
tuple val(meta), path("*__deform_warp.mgz"), emit: deform_transform
tuple val(meta), path("*__deform_warp.nii.gz"), emit: deform_transform
tuple val (meta), path("*__init_warp.lta"), emit: init_transform
path "versions.yml" , emit: versions

Expand All @@ -38,7 +37,7 @@ process REGISTRATION_SYNTHREGISTRATION {
export OPENBLAS_NUM_THREADS=1
mri_synthmorph ${init} -t ${prefix}__init_warp.lta $moving $fixed
mri_synthmorph ${warp} ${gpu} ${lambda} ${steps} ${extent} ${weight} -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.mgz -o ${prefix}__output_warped.nii.gz $moving $fixed
mri_synthmorph ${warp} ${gpu} ${lambda} ${steps} ${extent} ${weight} -i ${prefix}__init_warp.lta -t ${prefix}__deform_warp.nii.gz -o ${prefix}__output_warped.nii.gz $moving $fixed
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -54,7 +53,7 @@ process REGISTRATION_SYNTHREGISTRATION {
mri_synthmorph -h
touch ${prefix}__output_warped.nii.gz
touch ${prefix}__deform_warp.mgz
touch ${prefix}__deform_warp.nii.gz
touch ${prefix}__init_warp.lta
cat <<-END_VERSIONS > versions.yml
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-scil/registration/synthregistration/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ output:
- deform_transform:
type: file
description: Deform transformation
pattern: "*.{mgz}"
pattern: "*.{nii.gz}"

- warped_image:
type: file
Expand Down
5 changes: 2 additions & 3 deletions tests/modules/nf-scil/registration/synthregistration/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
- registration/synthregistration
- registration
files:
- path: output/registration/test__deform_warp.mgz
contains:
- '# TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead '
- path: output/registration/test__deform_warp.nii.gz
md5sum: d01c753043af2257908d049ade978981
- path: output/registration/test__init_warp.lta
md5sum: 46ad5a5d359b2ec157d1164135e746eb
- path: output/registration/test__output_warped.nii.gz
Expand Down

0 comments on commit d009a88

Please sign in to comment.