Skip to content

Commit ffb8a16

Browse files
authored
Merge pull request #2780 from MartinGrignard/MeshFix
Fix --fineTune arguments order for MeshFix command
2 parents 8918703 + 9b91e47 commit ffb8a16

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.zenodo.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,11 @@
587587
"affiliation": "MIT, HMS",
588588
"name": "Ghosh, Satrajit",
589589
"orcid": "0000-0002-5312-6729"
590+
},
591+
{
592+
"affiliation": "GIGA Institute",
593+
"name": "Grignard, Martin",
594+
"orcid": "0000-0001-5549-1861"
590595
}
591596
],
592597
"keywords": [

nipype/interfaces/meshfix.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ class MeshFixInputSpec(CommandLineInputSpec):
7070

7171
x_shift = traits.Int(
7272
argstr='--smooth %d',
73-
desc=
74-
"Shifts the coordinates of the vertices when saving. Output must be in FreeSurfer format"
73+
desc="Shifts the coordinates of the vertices when saving. Output must be in FreeSurfer format"
7574
)
7675

7776
# Cutting, decoupling, dilation
@@ -80,8 +79,7 @@ class MeshFixInputSpec(CommandLineInputSpec):
8079
desc="Remove triangles of 1st that are outside of the 2nd shell.")
8180
cut_inner = traits.Int(
8281
argstr='--cut-inner %d',
83-
desc=
84-
"Remove triangles of 1st that are inside of the 2nd shell. Dilate 2nd by N; Fill holes and keep only 1st afterwards."
82+
desc="Remove triangles of 1st that are inside of the 2nd shell. Dilate 2nd by N; Fill holes and keep only 1st afterwards."
8583
)
8684
decouple_inin = traits.Int(
8785
argstr='--decouple-inin %d',
@@ -101,23 +99,28 @@ class MeshFixInputSpec(CommandLineInputSpec):
10199

102100
finetuning_inwards = traits.Bool(
103101
argstr='--fineTuneIn ',
104-
requires=['finetuning_distance', 'finetuning_substeps'])
102+
requires=['finetuning_distance', 'finetuning_substeps'],
103+
position=-3,
104+
desc="Used to fine-tune the minimal distance between surfaces."
105+
)
105106
finetuning_outwards = traits.Bool(
106-
argstr='--fineTuneIn ',
107+
argstr='--fineTuneOut ',
107108
requires=['finetuning_distance', 'finetuning_substeps'],
109+
position=-3,
108110
xor=['finetuning_inwards'],
109-
desc=
110-
'Similar to finetuning_inwards, but ensures minimal distance in the other direction'
111+
desc='Similar to finetuning_inwards, but ensures minimal distance in the other direction'
111112
)
112113
finetuning_distance = traits.Float(
113114
argstr='%f',
114115
requires=['finetuning_substeps'],
116+
position=-2,
115117
desc="Used to fine-tune the minimal distance between surfaces."
116118
"A minimal distance d is ensured, and reached in n substeps. When using the surfaces for subsequent volume meshing by gmsh, this step prevent too flat tetrahedra2)"
117119
)
118120
finetuning_substeps = traits.Int(
119121
argstr='%d',
120122
requires=['finetuning_distance'],
123+
position=-1,
121124
desc="Used to fine-tune the minimal distance between surfaces."
122125
"A minimal distance d is ensured, and reached in n substeps. When using the surfaces for subsequent volume meshing by gmsh, this step prevent too flat tetrahedra2)"
123126
)

nipype/interfaces/tests/test_auto_MeshFix.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_MeshFix_inputs():
2727
requires=['finetuning_distance', 'finetuning_substeps'],
2828
),
2929
finetuning_outwards=dict(
30-
argstr='--fineTuneIn ',
30+
argstr='--fineTuneOut ',
3131
requires=['finetuning_distance', 'finetuning_substeps'],
3232
xor=['finetuning_inwards'],
3333
),
@@ -89,6 +89,8 @@ def test_MeshFix_inputs():
8989
for key, metadata in list(input_map.items()):
9090
for metakey, value in list(metadata.items()):
9191
assert getattr(inputs.traits()[key], metakey) == value
92+
93+
9294
def test_MeshFix_outputs():
9395
output_map = dict(mesh_file=dict(), )
9496
outputs = MeshFix.output_spec()

0 commit comments

Comments
 (0)