miblab.kidney_pc_dixon#

miblab.kidney_pc_dixon(input_array, device=None, postproc=True, clear_cache=False, verbose=False)[source]#

Segment individual kidneys on post-contrast Dixon images.

This requires 4-channel input data with out-phase images, in-phase images, water maps, and fat maps.

Parameters:
  • input_array (numpy.ndarray) – A 4D numpy array of shape [x, y, z, contrast] representing the input medical image volume. The last index must contain out-phase, in-phase, water and fat images, in that order.

  • device (str) – processor on which to deply the computation. If this is not provided, this defaults to “cuda” (if this is available) and “cpu” otherwise.

  • postproc (bool) – If True, applies post-processing to select the largest connected component from the UNETR output for each kidney mask

  • clear_cache – If True, the downloaded pth file is removed again after running the inference.

  • verbose (bool) – If True, prints logging messages.

Returns:

Label image

Return type:

numpy.ndarray