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:
- i1array_like
- i2array_like
The two images.
- h1MedPy image header
- h2MedPy image header
The corresponding headers.
- Returns:
- v1ndarray
The intersecting part of
i1
.- v2ndarray
The intersecting part of
i2
.- offsettuple of floats
The new offset of
v1
andv2
in real world coordinates.