save macro

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

save macro

Robert Baer
I recently pulled out a plug-in (rather large set of of routines that someone else wrote) that analyzes some gray scale images in a series of steps.  The last time I used the plug-in was in the ImageJ 1.43 era, I think, and everything seemed to work well at the time.

Now the plug-in gets part way through its processing of image 1, and halts with an image window showing, and it pops up the dialog box saying, "The save() macro function requires a file name extension."

Since there are numerous .java files associated with this process, I was hoping someone might verify: 1) whether there indeed have been any changes to ImageJ code that might have induced this behavior?  and  2) how a call to the save() macro is likely to appear in the .java associated with the plug-in code.  Would it look like IJ.macro("fname") or something else?

 It could be my problems with the plug-in lie elsewhere in ways I don't yet understand.  Any other general debugging tricks to share?  I don't do much code development.

Thanks,

Rob

------------------------------------------
Robert W. Baer, Ph.D.
Professor of Physiology
Kirksville College of Osteopathic Medicine
A. T. Still University of Health Sciences
Kirksville, MO 63501
660-626-232
FAX 660-626-2965
Reply | Threaded
Open this post in threaded view
|

Re: save macro

dscho
Hi,

On Tue, 22 Feb 2011, Robert Baer wrote:

> [...] the plug-in gets part way through its processing of image 1, and
> halts with an image window showing, and it pops up the dialog box
> saying, "The save() macro function requires a file name extension."

The problem comes from the save() method in IJ:

http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=ImageJA.git;a=blob;f=ij/IJ.java;hb=refs/heads/master#l1458

The funny thing is that this error message was introduced in 1.34j, back
in March 2005. And that's only when the error message was changed from
"File name extension required" to its current form.

So I guess that something changed in the way you call your plugin rather
than in ImageJ. I can only guess since I was deprived from having a look
at your code (making it hard to help you).

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: save macro

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Robert Baer
On Feb 22, 2011, at 5:39 PM, Robert Baer wrote:

> I recently pulled out a plug-in (rather large set of of routines that someone else wrote) that analyzes some gray scale images in a series of steps.  The last time I used the plug-in was in the ImageJ 1.43 era, I think, and everything seemed to work well at the time.
>
> Now the plug-in gets part way through its processing of image 1, and halts with an image window showing, and it pops up the dialog box saying, "The save() macro function requires a file name extension."
>
> Since there are numerous .java files associated with this process, I was hoping someone might verify: 1) whether there indeed have been any changes to ImageJ code that might have induced this behavior?  and  2) how a call to the save() macro is likely to appear in the .java associated with the plug-in code.  Would it look like IJ.macro("fname") or something else?
>
> It could be my problems with the plug-in lie elsewhere in ways I don't yet understand.  Any other general debugging tricks to share?  I don't do much code development.

The IJ.save(path) method displays a "The save() macro function requires a file name extension." error message if the file path does not have an extension. Starting with the 1.45c2 daily build, it saves in TIFF format rather than displaying this error message.

-wayne