MSIght.refactor_histology_preprocess

Created on Fri Nov 15 17:08:52 2024

@author: lafields2

Functions

bin_he_image(threshold_value, red_channel)

Binarizes the red channel of an H&E image using a specified threshold.

foreground_extract(image, foreground_mask)

Extracts the foreground (tissue region) from an H&E image using a binary mask.

foreground_mask_make(image)

Creates a foreground mask by isolating tissue regions from an H&E image using HSV color thresholding.

load_he_image(image_path)

Loads an H&E image from the specified file path.

preprocess_he(image_path, threshold_value, ...)

Preprocesses an H&E image by extracting the tissue region, binarizing, and smoothing it.

red_channel_extract(foreground_image)

Extracts the red channel from the foreground image.

smooth_he_image(thresholded_image)

Applies Gaussian smoothing to a binarized H&E image.