Skip to content

Releases: mastodon-sc/mastodon

Mastodon beta-26.

26 Oct 15:27
Compare
Choose a tag to compare

Mastodon beta-26: plays nice with Fiji, the branch-graph, and the grapher views.

This release ships a large number of new features, focused on ease-of-life for the user, new data structures, interoperability with Fiji, scripting and handling of images stored remotely. It was built with new contributors that joined the governance. We put some highlights below. But in short:

  • Mastodon integration with Fiji is better now. You can create a Mastodon project directly on a 'normal' image opened in Fiji; you can open a Mastodon project file by drag and drop; and Mastodon can be scripted using the Fiji script editor.

  • There is a new view called the Grapher. It allows plotting and exploring numerical feature values in a XY graph, and can be synchronized with other view types.

  • The data model has a new component: the branch-graph. The branch graph is built on the lineage graph and represent each branch (for instance, the trajectory of a cell between two divisions) as a single object: a branch. This allows views that are based on the branch graph to be more synthetic (and more responsive; fewer objects to render). This allows also computing numerical features on the branch themselves, for instance the duration of a cell cycle. The TrackScheme and BDV views can display and interact with the branch-graph. And it is used in a new TrackScheme mode: the hierarchy view.

The features described below:

  • Create a Mastodon project directly from an image opened in Fiji.
  • A new data structure and the associated views: the branch graph.
  • Support for OME-NGFF and remotely hosted datasets.
  • The launcher has a list of recent projects.
  • Open Mastodon projects by drag & drop on the Fiji toolbar.
  • A grapher for feature values.
  • Scripting Mastodon in the Fiji script editor.
  • Mastodon can open a project even if the image data is missing.
  • Movies can be recorded from the BDV views.
  • Auto-linking mode in BDV views.
  • Ask to save before closing Mastodon.
  • Extract a Fiji time-lapse following a track.
  • Other changes.

Create a Mastodon project directly from an image opened in Fiji.

It is now possible to create a new Mastodon project directly from an image opened in Fiji. The core code to wrap a SpimData around an ImagePlus is based on existing code by Tobias in the BDV Fiji plugins. The proper handling of this feature in Mastodon mainly requires dealing with warning the user and ultimately offering exporting the image to a BDV file.

It works like this:

The launcher "New Mastodon project" as a new option, listing the images opened in Fiji as possible source.

Screenshot 2022-07-06 at 14 02 22

Project created this way looks like classic Mastodon project, as if the image source had only 1 resolution level.
The LUT and display scale are imported from the ImagePlus as well.
Screenshot 2022-07-06 at 14 05 36

The image data in Mastodon wraps the ImagePlus data. If the user modify the image in the ImagePlus window, the modifications will be shown, and used, in Mastodon:
Screenshot 2022-07-06 at 14 06 57

Because of this we have to be extra careful when the user closes the ImagePlus. So the ImagePlus window is modified to listen to the user closing the image, and shows this message:
Screenshot 2022-07-06 at 14 11 45
If the user clicks 'Yes', both the image and all Mastodon windows are closed.

When the user wants to save such a Mastodon project, they are offered to export the image to a BDV file:
Screenshot 2022-07-06 at 14 17 40

It then shows the familiar dialog of the BDV export (the code is copied from the BDV Fiji plugin):
Screenshot 2022-07-06 at 14 25 26

After the export, the user is prompted to save the Mastodon project in a standard way. The Mastodon session will now run using the new BDV file as source for the image data, not on the ImagePlus anymore. The warning that appeared when trying to close the image is removed.

If the user chooses not to export to a BDV file, a standard project file will be created, but with a dataset field pointing to where the image file is saved (as inferred from the FileInfo of the ImagePlus). Such a project can now be reloaded by Mastodon normally, without warning.

A new data structure and the associated views: the branch graph.

What is a branch-graph?

A branch graph is a simplified view of a source graph, called here the linked graph, that offers a coarser level of details by representing branches of the linked graph as a single vertex in the branch graph.

A branch in the linked graph is defined as sequence of connected vertices, where all except the last vertex have exactly one outgoing edge, and all except the first vertex have exactly one incoming edge.

If the linked graph has a branch like this:

v0 → v1 → v2 → v3

It's represented in the branch graph as a single vertex: bv0
Where bv0 links to all the nodes, and edges: v0 → v1 → v2 → v3.

A small graph like this:

                 v3 → v4 → v5
              /
 v0 → v1 → v2
              \
                 v6 → v7 → v8

will be represented by the following branch graph:

       bv1
     /
 bv0
     \
       bv2

The vertices and edge of the branch graph are linked to the vertices and edges of the original graph as follows:

  • bv0 is linked to v0 → v1 → v2
  • bv1 is linked to v3 → v4 → v5
  • bv2 is linked to v6 → v7 → v8
  • The edge bv0 → bv1 is linked to the edge v2 → v3
  • The edge bv0 → bv2 is linked to the edge v2 → v6

In the context of Mastodon, the branch-graph is important for two main reasons:

  • Views that are based on the branch-graph have a good performance, because the branch-graph is sparse compared to the core-graph it is based on.
  • Biology applications need the branch-graph. There are many important features that are defined on the branch-graph, such as cell-cycle length, cell excursion, cell hierarchy, etc. The branch-graph offers a convenient and sensible basis to compute and reason on them.

The branch-graph in Mastodon.

With this new version, Mastodon offers support for the branch-graph, and several views to interact with it. Also, numerical features can be computed and interrogated on the branch-graph. We list here the new views related to the branch graph, and the new coloring modes and features associated to it.

The new TrackScheme view for branch graph.

To create a TrackScheme view of the branch graph, either shift-click on the track scheme button on the main window, or use the Window > New TrackScheme Branch menu item

For instance, here is a dense lineage viewed in TrackScheme:
Mastodon_BranchGraph_TrackScheme_01

and here is its equivalent visualization with the branch-graph:
Mastodon_BranchGraph_TrackScheme_02

By zooming in, we can see that the branches are represented by only one vertex in the branch graph. Again comparing with the normal graph we have:
Mastodon_BranchGraph_TrackScheme_03
Mastodon_BranchGraph_TrackScheme_04

Mastodon_BranchGraph_TrackScheme_05
Mastodon_BranchGraph_TrackScheme_06

Notice that the TrackScheme window has a button Regen branch graph. The modifications made to the linked graph are not automatically synchronized to the branch graph, for performance reasons. This button forces the branch-graph getting in sync.

The new Hierarchy view.

We made a new view, derived directly from the branch TrackScheme: the TrackScheme Hierarchy. It is a view of a lineage like TrackScheme, except that the Y displays the level of the branch. That is: how many times the cell divided since the first mother cell. By default it is painted with curved lines:

Mastodon_BranchGraph_Hierarchy_01

The new table view.

The branch graph called for a new table view, that could display items and features also from the branch graph. The table window has now 4 tables, 2 for the linked graph and 2 for the branch graph:

Mastodon_branch-graph_04

Navigation and selection events with the branch graph.

The branch graph views still share selection and events with the normal views:

Selection
  • Selecting a branch spot selects all the spots and links that are linked to it.
  • Selecting a branch link selects the link it is linked to. And conversely.
  • Conversely, a branch spot will be shown as selected if and only if all the spots and links that are linked to it are selected.
Highli...
Read more

Mastodon beta-20.

24 Jul 17:37
Compare
Choose a tag to compare

This new beta version contains several additions initiated by Ko Sugawara @ksugar to facilitate the deployment of the Elephant project https://github.com/elephant-track.

The latest changes can be summarised as follow:

  • Listeners can be registered to the WindowManager to be notified when a new BDV view is created by the user.
  • Fix a deadlock in TrackScheme occurring when TrackScheme was launched while spots or links were created.
  • New settings for the BDV view:
    • stroke of spots
    • stroke of links
    • paint ellipses filled.
  • Settings page are in a scroll pane, when they become very long.

Mastodon beta-18.

12 May 12:36
Compare
Choose a tag to compare

Mastodon beta-18.

This new beta of Mastodon focuses mainly on bringing some clarity in the development process and a rework of the intensity-based feature computation. If you are interested in the development of Mastodon, read at the end of this changelog for the changes in development guidelines that come with this release.


Changelog.

New intensity features and removed ones.

Tobias made a new and convenient iterator that can iterate through all the pixels of an ellipsoid exactly once, regardless of the transform or shape of the ellipsoid (https://github.com/mastodon-sc/mastodon/blob/master/src/main/java/org/mastodon/mamut/feature/EllipsoidIterable.java). It is used in this release to rewrite and change all the intensity-based features:

  • The Spot intensity feature computes the mean, min, max, sum, median and std of the pixel values in a spot for each channel.
  • The sum intensity and median intensity feature in the mastodon-pasteur artifact were removed (replaced by above feature).
  • The Spot gaussian-filtered intensity feature is now renamed in Spot center intensity (it does that). It now only returns the mean value, not the std anymore.
  • There is now a Spot quick mean feature, that computes the mean intensity on the highest resolution level available, in a multi-threaded fashion. It brings faster computation speed at the cost of accuracy. Because so far we tested computation on HDF5 images, for which in Java there is no multithreaded access, its benefit are yet limited.

Better look of the window and dialog icons when minimized.

Screenshot 2021-05-12 at 14 20 16

No more warnings about plugin commands without a description.

All the plugin commands that are were mapped by default and that were are regifted in the bdv, ts or table contexts generated an error message everytime preferences were edited.

This also allows these commands to be edited in the Mastodon Keymap editor.

Finally, the ts context is now renamed to trackscheme.

[Bugfix - core] Don't complaint when pressing 'Save' with a newly created project.

This happened because just after creating a project on a H5/xml file, there is not yet a Mastodon project to save to. With this fix, pressing the Save button asks the user for a .mastodon file to save to.

[Bugfix - mastodon-tracking] Mastodon blocks during semi-automatic tracking.

Sometimes when a TrackScheme window was opened and when semi-automatic tracking was done in a BDV window, Mastodon could become blocked. This was caused by conflicting graph update sent by the semi-automatic tracker and TrackScheme trying to repaint the whole model every-time.

This release contains a tentative fix that does update notification in a more timely manner.

Noticed by Jang-Mi Kim (Institut Pasteur) & Arianne Bercowsky (EPFL).

[Bugfix - core] Feature update mechanism does not work properly.

Mastodon can do feature value updates. The values for some features are not recomputed for an object if this object and its neighbor objects did not change between computations. This help greatly in the case of large models for the intensity features, that take ages to compute.

Normally when the user modifies a spot, its feature values that need recomputing should be deleted (e.g. as they appear from the tables) to avoid misleading the user with faulty feature values after modification. A bug prevented the features to be deleted when a spot was edited. This is fixed now.

Noticed by Ko Sugawara (ENS-Lyon).


Changes in the development practices.

Prior to this beta, there were two Mastodon versions uploaded to Fiji. The first one - Mastodonpreview - was in sync with the master but did not have many features. It brought really the core of Mastodon but did not have for instance the table views.

The second one - Mastodon-jungle - had a lot of features, including the table views, the visibility modes, etc.... These features were not (still are not) reviewed by Tobias, which violates somehow our development guidelines. However we (Tobias and JY) reasoned that in the beta phase they should be brought to the community in an early manner. So a branch named jungle3 was made that merged all the PRs with the new features, and uploaded to Fiji. This is the version the users have had playing with since a couple of months.

As noted by others, this deployed version was not in sync with the master, which started to cause some confusions. So:

  • We forked the original master branch to another one to save its state (master-before-switch) and rebased the feature PRs against this one. This way we can analyze them a posteriori when we have time.
  • We merged the jungle3 on the master branch.

From now on, we will test the following development guidelines:

  • The master branch will remains in sync with the version uploaded to Fiji. Except for minor things such as the version specified in the pom.xml.
  • In between releases, all development will be made on the dev branch. So if you make a PR, please make it against the dev branch.
  • For a release, the dev branch will be merged on the master, tested then uploaded to Fiji. The next development cycle will happen again on the dev branch.