Skip to content

Roadmap #1

@danielballan

Description

@danielballan

xref: https://forum.image.sc/t/napari-plugin-and-tutorial-for-remote-data-access/70257/2

Broadly, we want to replicate https://tiled-demo.blueskyproject.io/ui/browse/ but in a Napari plugin. Rough plan for order to build this in....

Step 0

From the IPython terminal embedded in Napari, load data into the viewer. Untested suggestion:

from tiled.client import from_uri
c = from_uri("https://tiled-demo.blueskyproject.io/api")
ac = c["generated"]["small_image"]  # tiled ArrayClient
viewer.add_image(ac)

MVP

  • Text entry for URL https://tiled-demo.blueskyproject.io.api and a button to "connect". This should stash a client c as state in the plugin.
  • List contents of root node as a table. To start, just show their keys. For example, for BlueskyRuns, these will be uids. c.keys()[:]
  • Support pagination. c.keys()[0:5], c.keys()[5:10], ...
  • Clicking a row should navigate into that sub-"directory". c[key]
  • Breadcrumbs should indicate the current location and enable navigation back up the tree.
  • If a given item is an array (c["a"]["b"]["c"].item["attributes"]["structure_family"] == "array") show a button the corresponding row.
  • The button adds a Layer to the view.
  • Customize the columns in the table. Perhaps use the same configuration that the React UI uses, where for a given Tiled "spec" we provide a list of columns:
    specs:
    - spec: CatalogOfBlueskyRuns
      columns:
        - header: Bluesky Plan
          select_metadata: start.plan_name
          field: plan_name
        - header: Scan ID
          select_metadata: start.scan_id
          field: scan_id
        - header: Time
          select_metadata: start.time
          field: start_time
      default_columns:
        - plan_name
        - scan_id
  • Solve the design question of how to conveniently get to "The Image" when presented with a composite object like BlueskyRun, without making the user walk the tree to dig the image node out.

Later

  • Search queries (prerequisite: needs work on the server to tell more about what the available options are)
  • Access tiled "profiles" as a convenience / alternative to entering a URL to connect. (Imagine a drop-down box listing the profiles.) Maybe make it possible to create and manage profiles within the plugin.
  • Draw on @michael-sutherland's work on mosaic-like layouts of images.
  • Napari emphasizes N-dimensional image viewer, but sometimes it's also useful to see a line plot or some other kind of data visualization next to the image. Some Napari plugins can integrate matplotlib figures and other things. We might use them to display non-array data (e.g. dataframes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions