![]() | ![]() |
![]() |
Previous Message |
Next Message Previous in Topic | Next in Topic Previous by Same Author | Next by Same Author Previous Page (August 2003) | Back to Main IMAGEJ Page | | ![]()
Reply
| Post a New Message |
Join or Leave IMAGEJ, or Change Options
|
Search | ![]()
Chronologically |
Most Recent First |
Wrap Text (Proportional Font) |
Don't Wrap Text (Non-proportional Font) | ![]() |
Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <[log in to unmask]> Date: Fri, 22 Aug 2003 23:57:57 +0200 Reply-To: ImageJ Interest Group <[log in to unmask]> Sender: ImageJ Interest Group <[log in to unmask]> From: Adrian Daerr <[log in to unmask]> Subject: Re: developing macro-recordable plugins? Comments: cc: Ulf Dittmer <[log in to unmask]> In-Reply-To: <[log in to unmask]>> a) how the macro call with the parameters (i.e., run("Threshold", > "thresholded remaining black") is generated during recording, and > b) how those parameters find their way back into the plugin code during > playback. If you use the GenericDialog to get your parameters from the user, I think everything to make the plugin recordable should already been taken care of: the idea is that an input-field "parameter : ____10.0" translates into a "parameter=10.0" argument during recording. This works for PlugIn and PlugInFilter. Quoting a mail from Wayne some time ago (Fri Jun 13th 2003): > The key to making a plugin accessable from macros is to use the > OpenDialog class for opening files, the SaveDialog class for saving > files, and the GenericDialog class for reading parameters. The > Batch_Converter plugin at > > http://rsb.info.nih.gov/ij/plugins/batch-converter.html > > uses all three of these classes. Note that you need to be running > ImageJ 1.30r or later to call the Batch_Converter from a macro since > earlier versions of ImageJ always recorded paths using the "path" > keyword. In V1.30r and later, the first word of the > OpenDialog/SaveDialog title is used as the keyword. > > With GenericDialogs, the first word of the item label is used as the > keyword so you need to make sure that each starting word is unique. If > it isn't, use an underscore to combine it with the second word. See the > Field of View Calculator plugin for and example. > > http://rsb.info.nih.gov/ij/plugins/fov-calculator.html hth, Adrian
![]() |
![]() Center for Information Technology National Institutes of Health Bethesda, Maryland 20892 301 594 6248 (v) 301 496 8294 (TDD) Comments and Assistance Accessibility ![]() |