Upper cut threshold added to perform image calculations
This commit is contained in:
@@ -68,6 +68,7 @@ def perform_image_calculations(
|
||||
preview=False,
|
||||
operations=["sum"],
|
||||
lower_cutoff_threshold=None,
|
||||
upper_cutoff_threshold=None,
|
||||
):
|
||||
"""
|
||||
Performs one or more calculations ("sum", "mean" or "std") for a given region of interest (roi)
|
||||
@@ -115,6 +116,8 @@ def perform_image_calculations(
|
||||
# use cutoff to set values to 0 below
|
||||
if lower_cutoff_threshold is not None:
|
||||
im_ROI = np.where(im_ROI < lower_cutoff_threshold, 0, im_ROI)
|
||||
if upper_cutoff_threshold is not None:
|
||||
im_ROI = np.where(im_ROI > upper_cutoff_threshold, 0, im_ROI)
|
||||
|
||||
# iterate over all operations
|
||||
for op in operations:
|
||||
|
||||
Reference in New Issue
Block a user