Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to show the obsSets on hover in spatial viewer of ome-tiff Image #389

Open
vdsukhov opened this issue Nov 15, 2024 · 0 comments

Comments

@vdsukhov
Copy link

Hi everyone,

First, thank you for this fantastic package — I'm really enjoying using it!

I have a quick question regarding customizing the information displayed when hovering over the mask of segmented cells. Currently, I only see the Cell ID on hover. I have added an object to my dataset containing additional information under obsSets, and I can see the cells are correctly colored by their classification. However, I can't seem to find a way to display this extra information (such as the classification label) when hovering over the cells.

Could anyone guide me on how to add or configure additional hover information for the segmented cells?

I've attached a couple of screenshots to illustrate the current behavior.

Thanks in advance for your help!

Here is the code snippet that I used to run the widget:

from vitessce import ( 
    VitessceConfig,
    Component as cm,
    CoordinationType as ct,
    OmeTiffWrapper,
    MultiImageWrapper, CsvWrapper
)
from os.path import join

vc = VitessceConfig(schema_version="1.0.16", name='CODEX', description='decr')
dataset = vc.add_dataset(name='CODEX').add_object(
    MultiImageWrapper(
        image_wrappers=[
            OmeTiffWrapper(
                img_url='http://localhost:8001/JK_SPL008_Scan1.ome.tif', 
                name="image"
            ),
            OmeTiffWrapper(
                img_url='http://localhost:8001/JK_SPL008_Scan1_segmentation.ome.tiff', 
                name="mask", is_bitmask=True),
        ],
 ),
).add_object(
    CsvWrapper(
        csv_url="http://localhost:8001/JK_SPL008.csv",
        data_type="obsSets",
        coordination_values={"obsType": "cell"},
        options={"obsIndex": "cell_id", "obsSets": [{"name": "classification", "column": "cluster"}]}
    )
)

spatial = vc.add_view(cm.SPATIAL, dataset=dataset)
lc = vc.add_view(cm.LAYER_CONTROLLER, dataset=dataset).set_props(disableChannelsIfRgbDetected=False)
obs = vc.add_view(cm.OBS_SETS, dataset=dataset)
vc.layout(spatial | lc / obs)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant