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

205_ROI_Visualise_colour_change #561

Open
milesAraya opened this issue Jan 20, 2025 · 2 comments · May be fixed by #402
Open

205_ROI_Visualise_colour_change #561

milesAraya opened this issue Jan 20, 2025 · 2 comments · May be fixed by #402
Assignees

Comments

@milesAraya
Copy link
Collaborator

milesAraya commented Jan 20, 2025

Current situation:
In VISUALISE tab, when there is a linked ROI and timeseries window, selecting an ROI causes the timeseries to appear using setImageItemClikedDataId.
However, there is no mechanism for selecting timeseries and causing an ROI to change colour.

This was started to be implemented in this branch
feature/RoiTimeSeriesSelectColourChange

https://github.com/arayabrain/barebone-studio/pull/402/files#diff-ebcd5cf6405721e2c4588c11ab1e26be87ec4d8822f52f9dc833f7c9fa939af9

Please check the details.
Note that this approach also included integration with Edit_ROI using statusRoi


React Plus:
React plus implemented a similar feature using setRoiSelected
React Plus had good colour change feature where unselected roi become a lighter colour.


Aim:
To unify the ROI / Timeseries select features of WORKFLOW and VISUALISE tabs
In VISUALISE
When ROI are selected, they change colour (non-selected become lighter), and if fluorescence window is linked time-series is plotted.
When the legend ROI is selected the selected ROI change colour.
When ROI selected in image plot, they can be un-selected in time series plot, and when timeseries selected in fluorescence plot, they can be un-selected in ROI plot

Integration with Edit ROI: Merge ROI, Delete ROI. When ROI selected in these actions, they should also change colour (e.g. other ROI become a lighter colour)

refImageItemId is used to link windows

@milesAraya milesAraya added this to the OIST requirements 2024 milestone Jan 20, 2025
@milesAraya milesAraya self-assigned this Jan 20, 2025
@milesAraya
Copy link
Collaborator Author

This issue contains an image explaining the request
#359

@tsuchiyama-araya
Copy link
Collaborator

tsuchiyama-araya commented Feb 18, 2025

ROI Visualize Colour Change – Additional Implementation

Current Implementation

  • Currently, On Visualize tab ROI (Region of Interest) highlighting is supported for image items.
  • The ROIs can also be linked to fluorescence data.

Additional Implementation Requirements

  • On Visualize tab implement functionality to highlight ROIs when the selected item type is:
    • All ROIs
    • Non-cell ROIs
    • Cell ROIs
  • Ensure that all three ROI types can be also linked to fluorescence data.

Example Explanation

  • The top row represents an image where ROIs can be highlighted or linked with fluorescence data.
  • The bottom row represents the ROI items (All ROIs, Non-cell ROIs, and Cell ROIs), which cannot be highlighted or linked with fluorescence.

This improvement ensures that the ROI highlighting and fluorescence linking are consistent across different ROI categories.

Image

Currently, when
Window 0: select item (tiff) -> Select Roi (cell_roi)
Window 1: Select fluorescence, link to #0
Then fluorescence shows to number of ROI as cell_roi

Image

However,
Window 0: select item cell_roi
Window 1: Select fluorescence, link to #0
Then fluorescence shows to number of ROI as all_cell_roi
The link does not work correctly

Image

Test with cell_roi highlights and hdf5 file.

This will also be helpful to the user who uploaded from hdf5 files.
Please do the test below to ensure that it's been done properly

  • Test1:
  1. Reproduce Tutorial1 and Run. Wait for it to be successfull
  2. in Visualize tab, in window 0 select cell_roi (no tiff file in background)
  3. in window 1 select fluorescence.
  4. Link windows
  5. Highlight any cell roi from window 0 and check if the cell is selected also at fluo window 1
  • Test 2:
  1. Reproduce Tutorial1 and Run. Wait for it to be successfull
  2. go to Record tab and download NWB
  3. In Workspace tab: upload nwb file using HDF5 data node.
  • You will need to use 3 hdf5 data node
     - cell_img -> processing/optinist/suite2p_roi_{unique_id}all_roi_img/data
     - fluo -> processing/ophys/suite2p_roi
    {unique_id}/Fluoresence/data
     - iscell -> processing/ophys/ImageSegmentation/suite2p_roi_{unique_id}/iscell
  1. Add roi_fluo_from_hdf5 algorithm node and connect the necessary inputs for the node
  2. In Visualize tab, select cell_roi in window 0, and fluorescence in 1
  3. Link windows
  4. Highlight any cell roi from window 0 and check if the cell is selected also at fluo window 1

@arayabrain arayabrain deleted a comment from milesAraya Feb 18, 2025
This was linked to pull requests Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment