File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,21 @@ class ImageMath(ANTSCommand, CopyHeaderInterface):
104
104
... op2='0.005 0.999 256').cmdline
105
105
'ImageMath 3 structural_maths.nii TruncateImageIntensity structural.nii 0.005 0.999 256'
106
106
107
+ >>> # Test the special case of PadImage. In this case, copy_header is disabled
108
+ >>> # because the header cannot be copied from inputs to ouptuts.
109
+ >>> # When operation is PadImage, the copy_header is set to False automatically:
107
110
>>> pad = ImageMath(
108
111
... op1='structural.nii',
109
- ... operation='PadImage',
110
- ... op2='0.005 0.999 256')
112
+ ... operation='PadImage')
111
113
>>> pad.inputs.copy_header
112
114
False
113
115
116
+ >>> # While operation remains as PadImage, copy_header will not accept True
114
117
>>> pad.inputs.copy_header = True
115
118
>>> pad.inputs.copy_header
116
119
False
117
120
121
+ >>> # For any other operation, copy_header gets its default behavior back.
118
122
>>> pad.inputs.operation = "ME"
119
123
>>> pad.inputs.copy_header = True
120
124
>>> pad.inputs.copy_header
You can’t perform that action at this time.
0 commit comments