|
6 | 6 | absolute_import)
|
7 | 7 | import os
|
8 | 8 |
|
9 |
| -from ..base import (TraitedSpec, File, traits, InputMultiObject, |
10 |
| - CommandLineInputSpec) |
| 9 | +from ..base import (TraitedSpec, File, traits, CommandLineInputSpec) |
11 | 10 | from .base import WBCommand
|
12 | 11 | from ... import logging
|
13 | 12 |
|
14 | 13 | iflogger = logging.getLogger('interface')
|
15 | 14 |
|
| 15 | + |
16 | 16 | class MetricResampleInputSpec(CommandLineInputSpec):
|
17 | 17 | in_file = File(
|
18 | 18 | exists=True,
|
@@ -96,6 +96,24 @@ class MetricResample(WBCommand):
|
96 | 96 | """
|
97 | 97 | Resample a metric file to a different mesh
|
98 | 98 |
|
| 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 | +
|
99 | 117 | >>> from nipype.interfaces.workbench import MetricResample
|
100 | 118 | >>> metres = MetricResample()
|
101 | 119 | >>> metres.inputs.in_file = 'sub-01_task-rest_bold_space-fsaverage5.L.func.gii'
|
@@ -139,5 +157,5 @@ def _list_outputs(self):
|
139 | 157 | outputs = super(MetricResample, self)._list_outputs()
|
140 | 158 | if self.inputs.valid_roi_out:
|
141 | 159 | 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) |
143 | 161 | return outputs
|
0 commit comments