File I/O from macro to / from PlugIn

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

File I/O from macro to / from PlugIn

Duff_Howell-2
Hi All

I am a relative java/imageJ newbie - I've been working with both, and a semi-useful starter Java book for a couple of weeks. I have a lot of industrial microscope data to analyze for MTF (Modulation Transfer Function) data, based on focus offsets, camera settings, and many other parameters on the system (a new startup company system, that is still in development, with a lot of parameters yet to be optimized).

There are published ImageJ plug-ins to do MTF analysis on an open image with a selected ROI. What I'm trying to do is get rid of the I/O dialogs that pop up for every single image file (I have hundreds, if not thousands to process in the near future). I have been able to write ImageJ macros to do all the handling of the files - opening, selecting ROI, etc, and I have altered the guts of the .java file in an MTF app to do all the calculations with no prompting from the user. The final hurdle is that both PlugIn and PlugInFilter return  void. I think I can get directory info on the open image in to the PlugIn with the arg variable, but, as I'm plodding through both the Werner Bailer Plugin Tutorial, and the Burger/Burge Image Processing appendix, I'm (hopefully) missing that last piece of how to get the data back out to the macro. It's a vector of doubles.   Is there a graceful way to hand this back?  Or call something besides the 'run' method from the plugIn?  As far as I can see, the only other way I could do it would be to write the vector to a file on the disk from within the plugIn, then parse it back off the disk from the macro.

I would very much appreciate any pointers to the missing connection here.

Thanks much