czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Mappings from physical components (phase,retardance,orientation) to HSV /JCh #141

Closed edyoshikun closed 4 months ago

edyoshikun commented 5 months ago

This PR has czyx functions that take a stack and output an RGB image mapping the label-free measurements to HSV.

This includes PRO-> HSV, RO->HSV and RO->JCh.

edyoshikun commented 5 months ago

@talonchandler tagging you here as reviewer, so we can move these functions to whatever repo makes sense later.

ieivanov commented 4 months ago

@talonchandler

talonchandler commented 4 months ago

Thanks @edyoshikun, I just took a closer look and I think there're some really nice functions in analysis/visualization.py.

I think the key function signatures are:

def HSV_PRO(czyx, channel_order, max_val_V: float = 1.0, max_val_S: float = 1.0):
def HSV_RO(czyx, channel_order: list[int], max_val_V: int = 1):
def JCh_mapping(czyx, channel_order: list[int], max_val_ret: int = None, noise_level: int = 1):

Compare those with the signature of recOrder's overlay function

def ret_ori_overlay(retardance, orientation, ret_max: Union[float, Literal["auto"]] = 10, cmap: Literal["JCh", "HSV"] = "JCh")

I think it's worthwhile cleaning these up and merging them.

Notes on overlap:

I will suggest:

talonchandler commented 4 months ago

@edyoshikun and I met and discussed our plan for handling this. I will work through and request @edyoshikun's reviews

talonchandler commented 4 months ago

Paired with https://github.com/mehta-lab/recOrder/pull/473. After approving and merging that PR, this PR can close.