|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- |
| 3 | +# vi: set ft=python sts=4 ts=4 sw=4 et: |
| 4 | +''' |
| 5 | +Miscellaneous algorithms |
| 6 | +
|
| 7 | + Change directory to provide relative paths for doctests |
| 8 | + >>> import os |
| 9 | + >>> filepath = os.path.dirname(os.path.realpath(__file__)) |
| 10 | + >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) |
| 11 | + >>> os.chdir(datadir) |
| 12 | +
|
| 13 | +''' |
1 | 14 | from ..interfaces.base import (BaseInterfaceInputSpec, TraitedSpec,
|
2 | 15 | BaseInterface, traits, File)
|
3 | 16 | from ..pipeline import engine as pe
|
@@ -38,8 +51,8 @@ class CompCor(BaseInterface):
|
38 | 51 | -------
|
39 | 52 |
|
40 | 53 | >>> ccinterface = CompCor()
|
41 |
| - >>> ccinterface.inputs.realigned_file = 'nipype/testing/data/functional.nii' |
42 |
| - >>> ccinterface.inputs.mask_file = 'nipype/testing/data/mask.nii' |
| 54 | + >>> ccinterface.inputs.realigned_file = 'functional.nii' |
| 55 | + >>> ccinterface.inputs.mask_file = 'mask.nii' |
43 | 56 | >>> ccinterface.inputs.num_components = 1
|
44 | 57 | >>> ccinterface.inputs.use_regress_poly = True
|
45 | 58 | >>> ccinterface.inputs.regress_poly_degree = 2
|
@@ -112,6 +125,20 @@ class TCompCorInputSpec(CompCorInputSpec):
|
112 | 125 | 'with the highest variance are used.')
|
113 | 126 |
|
114 | 127 | class TCompCor(CompCor):
|
| 128 | + ''' |
| 129 | + Interface for tCompCor. Computes a ROI mask based on variance of voxels. |
| 130 | +
|
| 131 | + Example |
| 132 | + ------- |
| 133 | +
|
| 134 | + >>> ccinterface = TCompCor() |
| 135 | + >>> ccinterface.inputs.realigned_file = 'functional.nii' |
| 136 | + >>> ccinterface.inputs.mask_file = 'mask.nii' |
| 137 | + >>> ccinterface.inputs.num_components = 1 |
| 138 | + >>> ccinterface.inputs.use_regress_poly = True |
| 139 | + >>> ccinterface.inputs.regress_poly_degree = 2 |
| 140 | + >>> ccinterface.inputs.percentile_threshold = .03 |
| 141 | + ''' |
115 | 142 |
|
116 | 143 | input_spec = TCompCorInputSpec
|
117 | 144 | output_spec = CompCorOutputSpec
|
|
0 commit comments