mlexchange / mlex_highres_segmentation

A Dash interface for ML-based segmentation of user-annotated large multi-dimensional image data
Other
5 stars 4 forks source link

:sparkles: Added a button to refresh dataset list when tiled server i… #166

Closed zhuowenzhao closed 9 months ago

zhuowenzhao commented 9 months ago

Changelog:

  1. encapsulated data util functions as a class object, which is shared across scripts after instantiated.
  2. added a refresh button next to the dataset dropdown to update the available datasets after tiled server is updated (re-indexed).

Note: removing a dataset from tiled will trigger missing data error if the dropdown selection was the one that is removed. Adding new dataset to tiled server should be fine.

zhuowenzhao commented 9 months ago

I like the refactoring of the data loading functionality into a class, but I think we should differentiate between what data is being acted upon. Saving and loading annotations has separate common variables (currently the filename, in the future the MASK_TILED_URI) from the raw data and I would thus suggest to place these in a separate class.

I could take this up when working on the refactoring of the annotations loading and saving functionality. For now, renaming DataUtils as Dylan suggested would be great.

Could you additionally reformat the code? We previously had Github actions with checks for formatting, linting, and testing but these were unintentionally removed in #158. (pip install -r requirements-dev.txt and then black .)?

I agree with the different variables are needed for loading and saving Tiled datasets. But there is also a possibility to add additional args for the saving function in TiledDataLoader class. I guess this can be further discussed in the future.

I have renamed the class and object, and tested it. Please have a check :)