Skip to content

Commit c3e4aac

Browse files
committed
hotfix(#348): The implemented logic was the opposite to the intended behavior
1 parent fdd5e23 commit c3e4aac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

niworkflows/interfaces/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ class GenerateSamplingReferenceInputSpec(BaseInterfaceInputSpec):
126126
desc='force xform code')
127127
fov_mask = traits.Either(None, File(exists=True), usedefault=True,
128128
desc='mask to clip field of view (in fixed_image space)')
129-
keep_native = traits.Bool(False, usedefault=True,
130-
desc='whether the original, native resolution should be '
131-
'used.')
129+
keep_native = traits.Bool(True, usedefault=True,
130+
desc='calculate a grid with native resolution covering '
131+
'the volume extent given by fixed_image, fast forward '
132+
'fixed_image otherwise.')
132133

133134

134135
class GenerateSamplingReferenceOutputSpec(TraitedSpec):
@@ -154,8 +155,8 @@ class GenerateSamplingReference(SimpleInterface):
154155
output_spec = GenerateSamplingReferenceOutputSpec
155156

156157
def _run_interface(self, runtime):
157-
if self.inputs.keep_native:
158-
self._results['out_file'] = self.inputs.moving_image
158+
if not self.inputs.keep_native:
159+
self._results['out_file'] = self.inputs.fixed_image
159160
return runtime
160161
self._results['out_file'] = _gen_reference(
161162
self.inputs.fixed_image,

0 commit comments

Comments
 (0)