Vision plot
validate_anatomical_plane
validate_anatomical_plane (anatomical_plane)
Ensure anatomical_plane is either 0, 1, or 2.
show_med_img
show_med_img (im, ctx, channel:int, slice_index:int, anatomical_plane:int, voxel_size:(<class'int'>,<class'list'>), ax=None, figsize=None, title=None, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, interpolation_stage=None, filternorm=True, filterrad=4.0, resample=None, url=None, data=None, **kwargs)
*Show an image on ax
. This is a modified code from the fastai function show_image
.
Args: im: The input image. ctx: The context. channel: Channel of the image. slice_index: Index of the 2D slice. anatomical_plane: Anatomical plane of the image. voxel_size: Voxel size for the image. ax: Axis for the plot. figsize: Figure size for the plot. title: Title for the plot. kwargs: Additional parameters for plt.Axes.imshow method.
Returns: Axis with the plot.*
find_max_slice
find_max_slice (mask_data, anatomical_plane)
Find slice index based on mask