question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visualize and edit graph like data in napari

See original GitHub issue

🚀 Feature

graph-layer to visualize and edit graph data in napari.

Motivation

I have graph-like data such as neurons paths or vertex model of epithelium. I would like to visualize it with my favorite image viewer in Python. More generally I suppose that graph-like data such as twitter-network, molecules, … could also use this layer type?

Pitch

  • create new graph-layer
  • load existing graph from a graph library (such as networkx? or other)
  • visualize in the viewer the graph and change the layout of edge/node
  • edit the graph by deleting only one node or a sub-branch

Alternatives

It is already possible to visualize graph data in napari using point, label or shape layer but is not optimal to edit.

  • vector and label layer example: skan

track-layer also have utils/visualization that can be reused?

Additional context

This issue follows a discussion with @alisterburt and @JoOkuma.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:41 (35 by maintainers)

github_iconTop GitHub Comments

4reactions
JoOkumacommented, Jun 25, 2022

Hi, everyone.

I implemented an initial version of the napari-graph. With this implementation, we’ll speed up the graph initialization and it’ll allow us to manipulate the graph.

Beyond that, I think it might be doable to have a single layer for graphs and tracks, where tracks are a directed graph with a sliding window (thick slices) over the time dimension.

I’m going to start working soon on the graph layer and do the final changes to the initial graph data structures of napari-graph.

Anyone interested in napari’s graph layer is welcome to review napari-graph#1.

3reactions
jnicommented, Apr 16, 2022

I want to add an additional option for the graph data structure, which is the trackmate graph, implemented in java here (I think that’s the right implementation link). @DragaDoncila thinks that it wouldn’t be too hard to implement in Python + numba. To me it feels like a lot of effort but not an insurmountable amount, and of all the solutions so far it is the only one that has been battle tested in this exact use case. Does anyone have the bandwidth to work on this directly? We can make a napari/graph repo and start work there.

I also want to reiterate that both @sofroniewn and I think automatic generation of graph layouts is out of scope for napari. The Graph layer input must include node coordinates. Edge paths are optional but should also be supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

napari viewer tutorial
This tutorial will teach you about the napari viewer, including how to use its graphical user interface (GUI) and how the data within...
Read more >
plugin | napari-time-series-plotter by Christopher Nauroth-Kress
A Plugin for napari to visualize pixel values over the first dimension (time -> t+3D, t+2D) as graphs. Install View project data ......
Read more >
napari.view_layers.Viewer
If provided, each channel in the data will be added as an individual image layer. In channel_axis mode, all other parameters MAY be...
Read more >
Interactive visualization with Napari - Squidpy - Read the Docs
It can be useful to explore the results of Scanpy/Squidpy analysis in an interactive way. Napari is a multi-dimensional image viewer for python,...
Read more >
Python power-up: new image tool visualizes complex data
The image viewing and analysis software napari has filled a gap in the ... no visualization tools that could handle n-dimensional data sets....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found