Previous topic

medpy.filter.utilities.xminus1d

Next topic

medpy.filter.utilities.pad

This Page

medpy.filter.utilities.intersection

medpy.filter.utilities.intersection(i1, h1, i2, h2)[source]

Returns the intersecting parts of two images in real world coordinates. Takes both, voxelspacing and image offset into account.

Note that the returned new offset might be inaccurate up to 1/2 voxel size for each dimension due to averaging.

Parameters:

i1 : array_like

i2 : array_like

The two images.

h1 : MedPy image header

h2 : MedPy image header

The corresponding headers.

Returns:

v1 : ndarray

The intersecting part of i1.

v2 : ndarray

The intersecting part of i2.

offset : tuple of floats

The new offset of v1 and v2 in real world coordinates.