Skip to content

Commit 9e61ec7

Browse files
committed
add documentation. fix unused variable. fix PEP8 errors
1 parent 82d2715 commit 9e61ec7

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

nipype/interfaces/workbench/metric.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
absolute_import)
77
import os
88

9-
from ..base import (TraitedSpec, File, traits, InputMultiObject,
10-
CommandLineInputSpec)
9+
from ..base import (TraitedSpec, File, traits, CommandLineInputSpec)
1110
from .base import WBCommand
1211
from ... import logging
1312

1413
iflogger = logging.getLogger('interface')
1514

15+
1616
class MetricResampleInputSpec(CommandLineInputSpec):
1717
in_file = File(
1818
exists=True,
@@ -96,6 +96,24 @@ class MetricResample(WBCommand):
9696
"""
9797
Resample a metric file to a different mesh
9898
99+
Resamples a metric file, given two spherical surfaces that are in
100+
register. If ``ADAP_BARY_AREA`` is used, exactly one of -area-surfs or
101+
``-area-metrics`` must be specified.
102+
103+
The ``ADAP_BARY_AREA`` method is recommended for ordinary metric data,
104+
because it should use all data while downsampling, unlike ``BARYCENTRIC``.
105+
The recommended areas option for most data is individual midthicknesses
106+
for individual data, and averaged vertex area metrics from individual
107+
midthicknesses for group average data.
108+
109+
The ``-current-roi`` option only masks the input, the output may be slightly
110+
dilated in comparison, consider using ``-metric-mask`` on the output when
111+
using ``-current-roi``.
112+
113+
The ``-largest option`` results in nearest vertex behavior when used with
114+
``BARYCENTRIC``. When resampling a binary metric, consider thresholding at
115+
0.5 after resampling rather than using ``-largest``.
116+
99117
>>> from nipype.interfaces.workbench import MetricResample
100118
>>> metres = MetricResample()
101119
>>> metres.inputs.in_file = 'sub-01_task-rest_bold_space-fsaverage5.L.func.gii'
@@ -139,5 +157,5 @@ def _list_outputs(self):
139157
outputs = super(MetricResample, self)._list_outputs()
140158
if self.inputs.valid_roi_out:
141159
roi_file = self._gen_filename(self.inputs.in_file, suffix='_roi')
142-
outputs['roi_file'] = os.path.abspath(roi)
160+
outputs['roi_file'] = os.path.abspath(roi_file)
143161
return outputs

0 commit comments

Comments
 (0)