Skip to content

Commit 0972fa0

Browse files
committed
DOC: Added example to LookupMeta docstring
1 parent 43e548a commit 0972fa0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

nipype/interfaces/dcmstack.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,19 @@ class LookupMetaInputSpec(TraitedSpec):
156156
)
157157

158158
class LookupMeta(BaseInterface):
159-
'''Lookup meta data values from a Nifti with embeded meta data.'''
159+
'''Lookup meta data values from a Nifti with embeded meta data.
160+
161+
Example
162+
-------
163+
164+
>>> from nipype.interfaces import dcmstack
165+
>>> lm = dcmstack.LookupMeta()
166+
>>> lm.inputs.in_file = 'input.nii.gz'
167+
>>> lm.inputs.meta_keys = {'RepetitionTime' : 'TR'}
168+
>>> result = lm.run()
169+
>>> result.outputs.TR
170+
9500.0
171+
'''
160172
input_spec = LookupMetaInputSpec
161173
output_spec = DynamicTraitedSpec
162174

0 commit comments

Comments
 (0)