@@ -1535,7 +1535,6 @@ def _run_interface(self, runtime):
15351535 def _list_outputs (self ):
15361536 return {'out' : getattr (self , '_gcor' )}
15371537
1538-
15391538class AxializeInputSpec (AFNICommandInputSpec ):
15401539 in_file = File (
15411540 desc = 'input file to 3daxialize' ,
@@ -1572,7 +1571,7 @@ class AxializeInputSpec(AFNICommandInputSpec):
15721571 orientation = Str (
15731572 desc = 'new orientation code' ,
15741573 argstr = '-orient %s' )
1575-
1574+
15761575
15771576class Axialize (AFNICommand ):
15781577 """Read in a dataset and write it out as a new dataset
@@ -1583,7 +1582,6 @@ class Axialize(AFNICommand):
15831582
15841583 Examples
15851584 ========
1586-
15871585 >>> from nipype.interfaces import afni
15881586 >>> axial3d = afni.Axialize()
15891587 >>> axial3d.inputs.in_file = 'functional.nii'
@@ -1597,3 +1595,166 @@ class Axialize(AFNICommand):
15971595 _cmd = '3daxialize'
15981596 input_spec = AxializeInputSpec
15991597 output_spec = AFNICommandOutputSpec
1598+
1599+
1600+ class ZcatInputSpec (AFNICommandInputSpec ):
1601+ in_files = InputMultiPath (
1602+ File (
1603+ desc = 'input files to 3dZcat' ,
1604+ exists = True ),
1605+ argstr = '%s' ,
1606+ position = - 1 ,
1607+ mandatory = True ,
1608+ copyfile = False )
1609+ out_file = File (
1610+ name_template = 'zcat' ,
1611+ desc = 'output dataset prefix name (default \' zcat\' )' ,
1612+ argstr = '-prefix %s' )
1613+ datum = traits .Enum (
1614+ 'byte' ,'short' ,'float' ,
1615+ argstr = '-datum %s' ,
1616+ desc = 'specify data type for output. Valid types are \' byte\' , '
1617+ '\' short\' and \' float\' .' )
1618+ verb = traits .Bool (
1619+ desc = 'print out some verbositiness as the program proceeds.' ,
1620+ argstr = '-verb' )
1621+ fscale = traits .Bool (
1622+ desc = 'Force scaling of the output to the maximum integer '
1623+ 'range. This only has effect if the output datum is '
1624+ 'byte or short (either forced or defaulted). This '
1625+ 'option is sometimes necessary to eliminate '
1626+ 'unpleasant truncation artifacts.' ,
1627+ argstr = '-fscale' ,
1628+ xor = ['nscale' ])
1629+ nscale = traits .Bool (
1630+ desc = 'Don\' t do any scaling on output to byte or short '
1631+ 'datasets. This may be especially useful when '
1632+ 'operating on mask datasets whose output values '
1633+ 'are only 0\' s and 1\' s.' ,
1634+ argstr = '-nscale' ,
1635+ xor = ['fscale' ])
1636+
1637+ class Zcat (AFNICommand ):
1638+ """Copies an image of one type to an image of the same
1639+ or different type using 3dZcat command
1640+
1641+ For complete details, see the `3dZcat Documentation.
1642+ <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dZcat.html>`_
1643+
1644+ Examples
1645+ ========
1646+
1647+ >>> from nipype.interfaces import afni
1648+ >>> zcat = afni.Zcat()
1649+ >>> zcat.inputs.in_files = ['functional2.nii', 'functional3.nii']
1650+ >>> zcat.inputs.out_file = 'cat_functional.nii'
1651+ >>> zcat.cmdline # doctest: +ALLOW_UNICODE
1652+ '3dZcat -prefix cat_functional.nii functional2.nii functional3.nii'
1653+ >>> res = zcat.run() # doctest: +SKIP
1654+ """
1655+
1656+ _cmd = '3dZcat'
1657+ input_spec = ZcatInputSpec
1658+ output_spec = AFNICommandOutputSpec
1659+
1660+ class ZeropadInputSpec (AFNICommandInputSpec ):
1661+ in_files = File (
1662+ desc = 'input dataset' ,
1663+ argstr = '%s' ,
1664+ position = - 1 ,
1665+ mandatory = True ,
1666+ exists = True ,
1667+ copyfile = False )
1668+ out_file = File (
1669+ name_template = 'zeropad' ,
1670+ desc = 'output dataset prefix name (default \' zeropad\' )' ,
1671+ argstr = '-prefix %s' )
1672+ I = traits .Int (
1673+ desc = 'adds \' n\' planes of zero at the Inferior edge' ,
1674+ argstr = '-I %i' ,
1675+ xor = ['master' ])
1676+ S = traits .Int (
1677+ desc = 'adds \' n\' planes of zero at the Superior edge' ,
1678+ argstr = '-S %i' ,
1679+ xor = ['master' ])
1680+ A = traits .Int (
1681+ desc = 'adds \' n\' planes of zero at the Anterior edge' ,
1682+ argstr = '-A %i' ,
1683+ xor = ['master' ])
1684+ P = traits .Int (
1685+ desc = 'adds \' n\' planes of zero at the Posterior edge' ,
1686+ argstr = '-P %i' ,
1687+ xor = ['master' ])
1688+ L = traits .Int (
1689+ desc = 'adds \' n\' planes of zero at the Left edge' ,
1690+ argstr = '-L %i' ,
1691+ xor = ['master' ])
1692+ R = traits .Int (
1693+ desc = 'adds \' n\' planes of zero at the Right edge' ,
1694+ argstr = '-R %i' ,
1695+ xor = ['master' ])
1696+ z = traits .Int (
1697+ desc = 'adds \' n\' planes of zero on EACH of the '
1698+ 'dataset z-axis (slice-direction) faces' ,
1699+ argstr = '-z %i' ,
1700+ xor = ['master' ])
1701+ RL = traits .Int (desc = 'specify that planes should be added or cut '
1702+ 'symmetrically to make the resulting volume have'
1703+ 'N slices in the right-left direction' ,
1704+ argstr = '-RL %i' ,
1705+ xor = ['master' ])
1706+ AP = traits .Int (desc = 'specify that planes should be added or cut '
1707+ 'symmetrically to make the resulting volume have'
1708+ 'N slices in the anterior-posterior direction' ,
1709+ argstr = '-AP %i' ,
1710+ xor = ['master' ])
1711+ IS = traits .Int (desc = 'specify that planes should be added or cut '
1712+ 'symmetrically to make the resulting volume have'
1713+ 'N slices in the inferior-superior direction' ,
1714+ argstr = '-IS %i' ,
1715+ xor = ['master' ])
1716+ mm = traits .Bool (desc = 'pad counts \' n\' are in mm instead of slices, '
1717+ 'where each \' n\' is an integer and at least \' n\' '
1718+ 'mm of slices will be added/removed; e.g., n = 3 '
1719+ 'and slice thickness = 2.5 mm ==> 2 slices added' ,
1720+ argstr = '-mm' ,
1721+ xor = ['master' ])
1722+ master = traits .File (desc = 'match the volume described in dataset '
1723+ '\' mset\' , where mset must have the same '
1724+ 'orientation and grid spacing as dataset to be '
1725+ 'padded. the goal of -master is to make the '
1726+ 'output dataset from 3dZeropad match the '
1727+ 'spatial \' extents\' of mset by adding or '
1728+ 'subtracting slices as needed. You can\' t use '
1729+ '-I,-S,..., or -mm with -master' ,
1730+ argstr = '-master %s' ,
1731+ xor = ['I' , 'S' , 'A' , 'P' , 'L' , 'R' , 'z' ,
1732+ 'RL' , 'AP' , 'IS' , 'mm' ])
1733+
1734+ class Zeropad (AFNICommand ):
1735+ """Adds planes of zeros to a dataset (i.e., pads it out).
1736+
1737+ For complete details, see the `3dZeropad Documentation.
1738+ <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dZeropad.html>`_
1739+
1740+ Examples
1741+ ========
1742+
1743+ >>> from nipype.interfaces import afni
1744+ >>> zeropad = afni.Zeropad()
1745+ >>> zeropad.inputs.in_files = 'functional.nii'
1746+ >>> zeropad.inputs.out_file = 'pad_functional.nii'
1747+ >>> zeropad.inputs.I = 10
1748+ >>> zeropad.inputs.S = 10
1749+ >>> zeropad.inputs.A = 10
1750+ >>> zeropad.inputs.P = 10
1751+ >>> zeropad.inputs.R = 10
1752+ >>> zeropad.inputs.L = 10
1753+ >>> zeropad.cmdline # doctest: +ALLOW_UNICODE
1754+ '3dZeropad -A 10 -I 10 -L 10 -P 10 -R 10 -S 10 -prefix pad_functional.nii functional.nii'
1755+ >>> res = zeropad.run() # doctest: +SKIP
1756+ """
1757+
1758+ _cmd = '3dZeropad'
1759+ input_spec = ZeropadInputSpec
1760+ output_spec = AFNICommandOutputSpec
0 commit comments