jbendtsen / AngioTool-Batch

A rewrite of AngioTool which can process multiple scans at a time
GNU General Public License v3.0
6 stars 2 forks source link

Use AngioTool2 as a FIJI plugin #3

Closed samefow closed 2 months ago

samefow commented 2 months ago

Thanks for the great app. I was directed here from a FIJI forum post where people discuss about using AngioTool as a fiji plugin. I have placed the angiotool2.jar file into the fiji/plugins folder but cannot find where to start the plugin in fiji's menu. Although this tool is planed to work as a standalone software especially for the batch mode, but I sincerely hope you can make it as a fiji plugin because a routine scenario of angiogenesis analysis is to do some preprocessing with FIJI, save the image to a file, then load the file in AngioTool, and perform the real analysis. With angiotool as a fiji plugin, the image instance can be shared between preprocessing process and angiotool, so we don't need to save and load the intermediate images, which will help a lot when we have many images to analyze. Thanks for your consideration.

jbendtsen commented 2 months ago

Thank you for your comment!

When I was working on improving AngioTool earlier this year, I was still not sure what the scope of the work would be or how I would support integrating it as a plugin. Back then, the analysis code, user interface code, and everything else was all tangled together with questionable organisation. At first, the only goal I had was to add a batch mode, however it soon became clear that fixing components of the analysis process was necessary. As I worked on that, I decided it would be worthwhile to ultimately rewrite the whole app, which I did. As part of rewriting the app, I cleanly delineated user interface, batch processing, and image analysis as separate divisions of the codebase.

This is all to say that I wasn't sure how I would have coerced the old code into becoming usable as a plugin, however, with the new code it should be fairly straightforward. It should be as simple as writing a an extra class that calls Analyzer.analyze() then Analyzer.drawOverlay() to get the resulting image. I don't know much about FIJI, but I can empathise with wanting a much smoother workflow where you just use the same app instead of going back and forth, saving and opening image files.

jbendtsen commented 2 months ago

AngioTool2 can now be used as a plugin. If anyone encounters issues with the plugin, let me know.

mrtamplin commented 1 month ago

Hi, the batch processing option does not appear to be available in the plugin version, and the r8 and older standalones are unable to run on my computer for some reason...simply is empty space in the GUI instead of the options. Would appreciate help with this as I am very excited to see the tool finally updated to have a batch processing option!! Thanks a lot!

jbendtsen commented 1 month ago

Could you please provide detail as to what prevents your computer from running AngioTool2 as a standalone app? If the EXE doesn't run, it should show an error message. The JAR file from any version r4 and onwards should run as a standalone as well, if you right-click it and open with Java Runtime. If that doesn't work either, try running it from command line with java -jar AngioTool2.jar, and it should output any error message.

The reason why Batch mode is not visible from the plugin is because when run as a plugin, AngioTool2 operates directly and only on the currently opened image. If I exposed Batch mode in its current state to the plugin, it would behave no differently than if it were run as a standalone app, where it does not integrate with ImageJ's Batch system and instead just works with image files directly.

As things currently stand, when running batches with AngioTool2, it needs to be launched independently of ImageJ. That said, if there is demand for a separate batch mode that goes through ImageJ's batch processing system, I'll consider adding that.

For now though, the real issue is: why is AngioTool2 not launching standalone on your computer?

Thank you