medpy.iterators.patchwise.CentredPatchIteratorOverlapping.applyslicer

static CentredPatchIteratorOverlapping.applyslicer(array, slicer, pmask, cval=0)[source]

Apply a slicer returned by the iterator to a new array of the same dimensionality as the one used to initialize the iterator.

Parameters:

array : array_like

A n-dimensional array.

slicer : list

List if slice() instances as returned by next().

pmask : narray

The array mask as returned by next().

cval : number

Value to fill undefined positions.

Notes

If array has more dimensions than slicer and pmask, the first ones are sliced.