Skip to content

Commit 8692b48

Browse files
author
dmordom
committed
Added VtoMat vista interface and updated CHANGES and autogenerated tests
accordingly
1 parent 2961958 commit 8692b48

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

CHANGES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Release 0.9.2 (January 8, 2014)
33

44
* FIX: DataFinder was broken due to a typo
55
* FIX: Order of DataFinder outputs was not guaranteed, it's human sorted now
6-
* ENH: New interfaces: Vnifti2Image
6+
* ENH: New interfaces: Vnifti2Image, VtoMat
77

88
Release 0.9.1 (December 25, 2013)
99
============
@@ -15,6 +15,8 @@ Release 0.9.0 (December 20, 2013)
1515

1616
* ENH: SelectFiles: a streamlined version of DataGrabber
1717
* ENH: new tools for defining workflows: JoinNode, synchronize and itersource
18+
* ENH: New interfaces: spm.ResliceToReference, FuzzyOverlap, afni.AFNItoNIFTI
19+
spm.DicomImport, P2PDistance
1820
* ENH: W3C PROV support with optional RDF export built into Nipype
1921
* ENH: Added support for Simple Linux Utility Resource Management (SLURM)
2022
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by "flexible_%s_templates"

nipype/interfaces/vista/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
3-
from .vista import (Vnifti2Image)
3+
from .vista import (Vnifti2Image, VtoMat)

nipype/interfaces/vista/vista.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,35 @@ class Vnifti2Image(CommandLine):
3232
3333
>>> vimage = Vnifti2Image()
3434
>>> vimage.inputs.in_file = 'image.nii'
35-
>>> vimage.inputs.out_file = 'image.v'
3635
>>> vimage.run() # doctest: +SKIP
3736
"""
3837

3938
_cmd = 'vnifti2image'
4039
input_spec=Vnifti2ImageInputSpec
4140
output_spec=Vnifti2ImageOutputSpec
41+
42+
43+
class VtoMatInputSpec(CommandLineInputSpec):
44+
in_file = File(exists=True, argstr='-in %s', mandatory=True, position=1, desc='in file')
45+
out_file = File(name_template="%s.mat", keep_extension=False, argstr='-out %s', hash_files=False,
46+
position= -1, desc='output mat file', name_source=["in_file"])
47+
48+
class VtoMatOutputSpec(TraitedSpec):
49+
out_file = File(exists=True, desc='Output mat file')
50+
51+
class VtoMat(CommandLine):
52+
"""
53+
Convert a nifti file into a vista file.
54+
55+
Example
56+
-------
57+
58+
>>> vimage = VtoMat()
59+
>>> vimage.inputs.in_file = 'image.v'
60+
>>> vimage.run() # doctest: +SKIP
61+
"""
62+
63+
_cmd = 'vtomat'
64+
input_spec=VtoMatInputSpec
65+
output_spec=VtoMatOutputSpec
66+

0 commit comments

Comments
 (0)