- apply_chords(im, spacing=1, axis=0, trim_edges=True, label=False)¶
Adds chords to the void space in the specified direction.
im (ndarray) – An image of the porous material with void marked as
spacing (int) – Separation between chords. The default is 1 voxel. This can be decreased to 0, meaning that the chords all touch each other, which automatically sets to the
axis (int (default = 0)) – The axis along which the chords are drawn.
trim_edges (bool (default =
True)) – Whether or not to remove chords that touch the edges of the image. These chords are artifically shortened, so skew the chord length distribution.
label (bool (default is
False)) – If
Truethe chords in the returned image are each given a unique label, such that all voxels lying on the same chord have the same value. This is automatically set to
Trueif spacing is 0, but is
image – A copy of
imwith non-zero values indicating the chords.
- Return type
Click here to view online example.