miblab_dl.kidney_pc_dixon_unetr#
- miblab_dl.kidney_pc_dixon_unetr(input_vol, device=None, overlap=0.3, 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_vol (vreg.Volume3D) – A 4D vreg volume 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.
overlap (float) – only valid for model = ‘unetr’ defines the amount of overlap between adjacent sliding window patches during inference. A higher value (e.g., 0.5) improves prediction smoothness at patch borders but increases computation time.
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:
A volume with a kidneys as label array (left=1, right=2).
- Return type:
vreg.Volume3D