tischi / fiji-plugin-imageRegistration

Plugin for registration of 5D image data.
3 stars 0 forks source link

Macro language compatibility? #11

Open 7rebor opened 6 years ago

7rebor commented 6 years ago

Since the plugin works really well with my experimental data, I'm interested to run it through a whole directory to batch process them.

Is there any scope to write this in to an IJ1 macro?

imagejan commented 6 years ago

The SciJava framework handles recording of macro options when running a Command with Parameters. The issue here is that RegistrationPlugin doesn't do any computation in its run method; all processing is done in callback methods that are only triggered from the UI, when a dialog is shown.

@7rebor for now you might be able to call the different components of the UI plugin from scripts (all except IJ1 macro language though) by re-using the commands here (although @tischi might have better advice):

https://github.com/tischi/fiji-plugin-imageRegistration/blob/f99d95f643a2aee9dc3c61c5688d2ecd8ea8701f/src/main/java/de/embl/cba/registration/ui/RegistrationPlugin.java#L304-L309

tischi commented 6 years ago

I don't have a better idea right now. I am still learning the ins and outs of macro recording in ImageJ2 myself. Probably will have a better idea in some weeks/months. If it helps I have java code (which should be easy to convert to a groovy script) that analyzes your example data set:

https://github.com/tischi/fiji-plugin-imageRegistration/blob/master/src/test/java/Register3D7rebor.java

I can however understand if that is too complex, I hope that I (or @imagejan ?) find the time to make a nice and simply groovy script for you that can easily by put in a loop.

Let us know what would be best for you!