mastodon-sc / mastodon-ctc Goto Github PK
View Code? Open in Web Editor NEWMastodon plugins to import from and export to (not only) the CellTrackingChallenge format
License: BSD 2-Clause "Simplified" License
Mastodon plugins to import from and export to (not only) the CellTrackingChallenge format
License: BSD 2-Clause "Simplified" License
check the original issue: CellTrackingChallenge/CTC-FijiPlugins#24
As of 5-Feb-2024 the CTC plugins and Mastodon plugins distributed through the Fiji updater are incompatible.
When starting Mastodon v1.0.0-beta-28 the following stack trace is generated:
[WARNING] 2 exceptions occurred during plugin discovery.
Exception in thread "Thread-8" java.lang.NoClassDefFoundError: org/mastodon/mamut/plugin/MamutPluginAppModel
at org.mastodon.ctc.CTC_Plugins.setAppPluginModel(CTC_Plugins.java:56)
at org.mastodon.mamut.ProjectModel.lambda$discoverPlugins$1(ProjectModel.java:208)
at org.mastodon.app.plugin.PluginUtils.lambda$forEachDiscoveredPlugin$0(PluginUtils.java:63)
at org.mastodon.app.plugin.PluginUtils.forEachDiscoveredPlugin(PluginUtils.java:96)
at org.mastodon.app.plugin.PluginUtils.forEachDiscoveredPlugin(PluginUtils.java:64)
at org.mastodon.mamut.ProjectModel.discoverPlugins(ProjectModel.java:211)
at org.mastodon.mamut.ProjectModel.<init>(ProjectModel.java:132)
at org.mastodon.mamut.ProjectModel.create(ProjectModel.java:250)
at org.mastodon.mamut.io.ProjectLoader.open(ProjectLoader.java:193)
at org.mastodon.mamut.launcher.LauncherUtil.openWithDialog(LauncherUtil.java:332)
at org.mastodon.mamut.launcher.MastodonLauncher.lambda$loadMastodonProject$19(MastodonLauncher.java:556)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ClassNotFoundException: org.mastodon.mamut.plugin.MamutPluginAppModel
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
... 12 more
Disabling the CTC update site allows Mastodon to function as expected. With the CTC plugins installed it cannot open any new or existing Mastodon project.
CTC update site provides:
mastodon-ctc-0.1.2.jar
Mastodon update site provides:
mastodon-1.0.0-beta-28.jar
I presume this is due to a binary incompatible API change in Mastodon. Hopefully the fix is a simple recompile with a compatible CTC change and redistribute.
Note: This may require a downstream change to the plugin discovery mechanism in Mastodon to catch errors, log them, but continue without the incompatible plugins. Currently Mastodon does not gracefully handle incompatible plugins.
Let me know if I should cascade this issue to Mastodon.
src/main/java/org/mastodon/tomancak/PlainTextFileExport.java
//open a folder choosing dialog
final File selectedFile = FileChooser.chooseFile(null, null,
new ExtensionFileFilter("txt"),
"Choose TXT file to write tracks into:",
FileChooser.DialogType.SAVE,
FileChooser.SelectionMode.FILES_ONLY);
@imagejan imagejan on Apr 27, 2020
You could use UIService#chooseFile() here (and improve the SciJava API in case it doesn't meet your requirements ;-)
@xulman xulman on Apr 27, 2020 Author Member
thanks @imagejan... I actually did not know about it and was anyway blindly following example of how to open file from some other Mastodon code,
I'll fix it... on my TODO list now ;-)
...and add visualization of them
originally from: CellTrackingChallenge/CTC-FijiPlugins#10
originating from the idea of @aherbert in #8 :
PS: You're right, maybe we should aim at detecting broken plugins on the Mastodon side.. although, I'm not sure how that should be achieved. Do you happen to have an idea?
I don't think this can be done from Mastodon's side. It would have to know all possible downstream users of the API. From the plugin side you could use GitHub's dependabot to notify you of new releases for Mastodon. This will raise a PR with the code updated to the latest Mastodon version whenever a release happens. In this case the PR would break as the API is incompatible and you should be sent a notification.
I've experienced dependabot working on repositories where it watches all your dependencies and can get very noisy with constant PRs for releases of minor revisions. For the mastodon-ctc repo there are only 3 direct dependencies so the noise should be low. You can configure dependabot to ignore dependencies if you only wish to watch mastodon.
taken from @aherbert from PR #9
Note: CTC-Measures use SimplifiedIO which includes some loci code. The new Mastodon beta-28 brings in Bioformats via a dependency which includes a lot of the same class files. I added an exclusion in the pom for the loci jar to get this to build. If you remove the exclusion and run:
mvn compile
the duplicates will be shown by the maven enforcer plugin used by scijava-pom.
I did not investigate updating CTC-Measures to see if there is a way to avoid SimplifiedIO and Bioformats clashing. I also did not check that all the classes used by SimplifiedIO are duplicated in the Bioformats jars. You can view the transitive dependencies using:
mvn dependency:tree
from this project and the CTC-Measures project.
It indeed must not be forgotten and should be fixed eventually....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.