Skip to content

Commit d2a48e1

Browse files
authored
Merge pull request #3210 from nipy/oesteban-patch-1
ENH: Add ``"TruncateImageIntensity"`` operation to ``ants.utils.Image.Math``
2 parents 9a7db4d + 5e560d9 commit d2a48e1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nipype/interfaces/ants/utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class ImageMathInputSpec(ANTSCommandInputSpec):
4646
"GE",
4747
"GO",
4848
"GC",
49+
"TruncateImageIntensity",
4950
mandatory=True,
5051
position=3,
5152
argstr="%s",
@@ -92,6 +93,12 @@ class ImageMath(ANTSCommand, CopyHeaderInterface):
9293
... op2='4').cmdline
9394
'ImageMath 3 structural_maths.nii G structural.nii 4'
9495
96+
>>> ImageMath(
97+
... op1='structural.nii',
98+
... operation='TruncateImageIntensity',
99+
... op2='0.005 0.999 256').cmdline
100+
'ImageMath 3 structural_maths.nii TruncateImageIntensity structural.nii 0.005 0.999 256'
101+
95102
"""
96103

97104
_cmd = "ImageMath"

0 commit comments

Comments
 (0)