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

Add features of Grapher to Grapher OpenGL #2

Open
11 of 18 tasks
stefanhahmann opened this issue Jul 26, 2024 · 9 comments
Open
11 of 18 tasks

Add features of Grapher to Grapher OpenGL #2

stefanhahmann opened this issue Jul 26, 2024 · 9 comments

Comments

@stefanhahmann
Copy link
Contributor

stefanhahmann commented Jul 26, 2024

Can be used with:

https://github.com/mastodon-sc/mastodon/tree/opengl-grapher-beta-31
https://github.com/stefanhahmann/mastodon-grapher-opengl/tree/adapt-to-beta-31

PR on https://github.com/mastodon-sc/mastodon-grapher-opengl:

https://github.com/mastodon-sc/mastodon-grapher-opengl/pulls

State:

I Made a comparison on a large dataset (~200.000 Spots). Rendering a view that contained all spots and edges in the existing Grapher took ~800ms on my machine. Rendering in the OpenGL Grapher took 1-2ms on my machine.

Known Missing Features in OpenGL Grapher:

  • Rectangular selection of points
  • On click selection of points
  • Drawing of Labels when zooming in
  • Using Styles set in Preferences for drawing points
    • Using colors set in Preferences for drawing points
    • Using the background color set in Preferences for drawing background
    • Using shape set in Preferences for drawing
  • Refresh of drawing area after setting new features and pressing 'plot'
  • Drawing animations
  • Show selected points
  • Updating selections in other views
  • Update, when selections in other views were updated
  • Zoom with the Z button
  • Navigate to point(s) that have been selected in a different window (e.g. TrackScheme) while the lock view symbol was pressed in both windows grafik
  • Make windows that are connected via the lock view symbol grafik navigate to points that have been selected in the OpenGL grapher
  • Highlight points that have been focused in different windows while in lock view mode grafik
  • Focus Points on Mouse Hover in Grapher OpenGL

Investigate

  • How to deliver the correct natives to the user via update sites? Required natives depend on the OS of the user.

Comparison

Grapher OpenGL:

grafik

Grapher:

grafik

@stefanhahmann
Copy link
Contributor Author

About the installation process, I found out the following:
The update site that delivers the plugin needs to have in the jars subfolder:

  • /jars/mastodon-grapher-opengl-*.jar
  • /jars/lwjgl-3.3.*.jar
  • /jars/lwjgl3-awt-0.1.8.jar
  • /jars/lwjgl-jawt-3.3.*.jar
  • /jars/lwjgl-opengl-3.3.*.jar

Moreover, it needs to have system specific subfolder in the jars subfolder (e.g. for windows64):

  • /jars/win64/lwjgl-3.3.*-natives-windows.jar
  • /jars/win64/lwjgl-glfw-3.3.*-natives-windows.jar (perhaps not needed, if no performance difference without it)
  • /jars/win64/lwjgl-opengl-3.3.1-natives-windows.jar

For Mac the natives would need to be in

  • /jars/macosx

For Linux the native would need to be in

  • /jars/linux64

@tinevez
Copy link
Collaborator

tinevez commented Sep 3, 2024

The support for Grapher styles is now partial: the colors are abided, but not the shape.
I think it is reasonable not to go that way: we want to keep the drawing efficient.

@tinevez
Copy link
Collaborator

tinevez commented Sep 4, 2024

There is now the zoom box which is nice.
You will need to pull from the opengl-beta31 branch in mastodon to use it.

@tinevez
Copy link
Collaborator

tinevez commented Sep 4, 2024

I also tried to harness multiple platforms.
I modified maven so that it works out of the box.

I am hitting a roadblock with mac arm arch and won't be trying to address it.
https://imagesc.zulipchat.com/#narrow/stream/327237-SciJava/topic/Maven.20profiles.20for.20natives.20with.20macs.20M1

I will test later how it works on Window.

@stefanhahmann
Copy link
Contributor Author

The support for Grapher styles is now partial: the colors are abided, but not the shape. I think it is reasonable not to go that way: we want to keep the drawing efficient.

I can confirm that Grapher styles work under windows that do not consider the shape.
The background color setting seems to be the only missing thing that is not related to shape at the moment.

@stefanhahmann
Copy link
Contributor Author

There is now the zoom box which is nice. You will need to pull from the opengl-beta31 branch in mastodon to use it.

I am not sure, if you were referring to making a selection with a rectangular box or to the Zoom behaviour pressing the Z button, but I can confirm that both work now.

@stefanhahmann
Copy link
Contributor Author

stefanhahmann commented Sep 20, 2024

I also tried to harness multiple platforms. I modified maven so that it works out of the box.

I am hitting a roadblock with mac arm arch and won't be trying to address it. https://imagesc.zulipchat.com/#narrow/stream/327237-SciJava/topic/Maven.20profiles.20for.20natives.20with.20macs.20M1

I will test later how it works on Window.

This seems to do the job for me on Windows. Tried both starting from IntelliJ and starting as a plugin from within Fiji.

@stefanhahmann
Copy link
Contributor Author

stefanhahmann commented Sep 20, 2024

I can confirm that the checked features work for me under windows as well.
A tested with a 6 million points drosophila dataset from Janelia and it is incredibly fast impossible to render these points in the non-GPU grapher with acceptable performance.

grafik

GIF 20 09 2024 14-56-22

@stefanhahmann
Copy link
Contributor Author

stefanhahmann commented Sep 23, 2024

I created a PR (#3) to check out
grafik

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

2 participants