Skip to content

Commit

Permalink
Merge pull request #1396 from nightwnvol/enh/conform-mode
Browse files Browse the repository at this point in the history
ENH: Add mode parameter to nibabel.processing.conform()
  • Loading branch information
effigies authored Dec 7, 2024
2 parents 9d1c0e5 + e066daf commit 59733ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nibabel/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def conform(
out_shape=(256, 256, 256),
voxel_size=(1.0, 1.0, 1.0),
order=3,
mode='constant',
cval=0.0,
orientation='RAS',
out_class=None,
Expand Down Expand Up @@ -353,6 +354,10 @@ def conform(
order : int, optional
The order of the spline interpolation, default is 3. The order has to
be in the range 0-5 (see ``scipy.ndimage.affine_transform``)
mode : str, optional
Points outside the boundaries of the input are filled according to the
given mode ('constant', 'nearest', 'reflect' or 'wrap'). Default is
'constant' (see :func:`scipy.ndimage.affine_transform`)
cval : scalar, optional
Value used for points outside the boundaries of the input if
``mode='constant'``. Default is 0.0 (see
Expand Down Expand Up @@ -393,7 +398,7 @@ def conform(
from_img=from_img,
to_vox_map=(out_shape, out_aff),
order=order,
mode='constant',
mode=mode,
cval=cval,
out_class=out_class,
)
Expand Down

0 comments on commit 59733ff

Please sign in to comment.