diff --git a/setup.cfg b/setup.cfg index ae7affa..5aaca8d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = mousetumornet -version = 0.0.4 +version = 0.0.5 description = nnU-Net model for the segmentation of lung tumor nodules in mice CT scans. long_description = file: README.md long_description_content_type = text/markdown diff --git a/src/mousetumornet/roi.py b/src/mousetumornet/roi.py index 3e7da3e..d965e3d 100644 --- a/src/mousetumornet/roi.py +++ b/src/mousetumornet/roi.py @@ -92,9 +92,9 @@ def compute_roi(img: np.ndarray): return df, lungs_bbox_data, body, roi -def compute_roi_bones(img: np.ndarray): +def compute_roi_bones(img: np.ndarray, q=0.99): """Computes a ROI encompassing the bones in the image - based on quantiles.""" - bones = (img > np.quantile(img, 0.99)).astype(np.uint8) + bones = (img > np.quantile(img, q)).astype(np.uint8) if bones.sum() == 0: print("It looks like no bones were segmented.") x0 = 0