<div dir="ltr">Hi Michael,<div><br></div><div>Apologies for the long delay in follow up.</div><div><br></div><div><div>> Concerning the 'Compile&Run' command, this is EXTREMELY handy and it</div><div>> would be a major step backwards if this is not supported any more!</div></div><div><br></div><div>Just wanted to let you know that we are indeed planning to work on restoring the Compile & Run command in ImageJ2:</div><div><br></div><div> <a href="https://github.com/imagej/imagej-ui-swing/issues/48">https://github.com/imagej/imagej-ui-swing/issues/48</a><br></div><div><br></div><div>We will have to address several related issues surrounding the javac compiler, javax.tools, and the switch to Java 8. (E.g., right now, you cannot develop Java code in the Script Editor when running with Java 7 or Java 8.) The goal is to make (a version of) Compile & Run work again as part of that effort.</div><div><br></div><div>Timeline might not be till first half of next year, but it is on the radar.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 29, 2015 at 4:02 AM, Michael Schmid <span dir="ltr"><<a href="mailto:schmid@iap.tuwien.ac.at" target="_blank">schmid@iap.tuwien.ac.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Curtis,<br>
<br>
Thank you for the additional information.<br>
<br>
It seems that Avital's problem was related to compiling, not to the patches of the IJ1 code in Fiji.<br>
<br>
Concerning the 'Compile&Run' command, this is EXTREMELY handy and it would be a major step backwards if this is not supported any more!<br>
If I get the java sources of a plugin, and it does not work exactly as I want, I can quickly try any changes that come into my mind or insert debugging code, try/catch statements, etc., and with a single click on Compile&Run (and the RETURN key to accept the same filename as before) I am already testing it on an image. This is independent of any programming environment, I can do it on any computer anywhere in a lab, or on the laptop of a colleague of mine who has a problem and asks me for help. And there won't be any automatic update reverting it to the published version.<br>
<br>
Also, for publishing a plugin, it's simpler to provide the java code on a web page with the description than preparing an ImageJ update site in addition. I can also send experimental plugin code to others by email, carry it around on a USB stick, etc.<br>
All this would be gone without Compile&Run!<br>
<br>
Best regards,<br>
<br>
Michael<br>
________________________________________________________________<br>
<div class="HOEnZb"><div class="h5">On May 28, 2015, at 20:42, Curtis Rueden wrote:<br>
<br>
> Hi Michael,<br>
><br>
> [Added the imagej-devel mailing list to CC, since this discussion may interest other ImageJ plugin developers.]<br>
><br>
> > A quick search for PlugInFilterRunner in the ij1-patcher seems to<br>
> > indicate that the PlugInFilterRunner is not patched.<br>
><br>
> There is another project on top of ij1-patcher that does the bulk of the actual patching for ImageJ2:<br>
><br>
> <a href="https://github.com/imagej/imagej-legacy" rel="noreferrer" target="_blank">https://github.com/imagej/imagej-legacy</a><br>
><br>
> And it does have logic that affects PlugInFilters:<br>
><br>
> <a href="https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.15.0/src/main/java/net/imagej/legacy/IJ1Helper.java#L591-L621" rel="noreferrer" target="_blank">https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.15.0/src/main/java/net/imagej/legacy/IJ1Helper.java#L591-L621</a><br>
><br>
> But at first glance, this is only used for the Script Editor's Run command in case the Java code being run is a PlugInFilter:<br>
><br>
> <a href="https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.15.0/src/main/java/net/imagej/legacy/LegacyJavaRunner.java#L54" rel="noreferrer" target="_blank">https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.15.0/src/main/java/net/imagej/legacy/LegacyJavaRunner.java#L54</a><br>
><br>
> I apologize that I will not have time to dig into this issue more over the summer -- but I'm insanely busy with work on the ImageJ Common data model and ImageJ OPS and SCIFIO APIs, ImageJ-OMERO integration, IT infrastructure resources and Fiji plugin maintenance, upcoming Madison ImageJ conference planning, paper writing, etc.<br>
><br>
> Backwards compatibility with ImageJ1 is extremely challenging, especially as things continue to evolve -- e.g., the major changes to how Java works on OS X, and the breaking changes of Java 8. The best we can do right now is to prioritize work that critically affects a large number of ImageJ users, where no easy workaround is possible. In the case of compiling Java plugins, there are several ways of doing it that do not require "Compile and Run" and similar, so for now that's what I'll recommend. I hope that plugin developers will make installation easy for their users by creating ImageJ update sites, rather than shipping bare .java files.<br>
><br>
> Regards,<br>
> Curtis<br>
><br>
> P.S. When searching for code, you might try <a href="http://search.imagej.net/" rel="noreferrer" target="_blank">http://search.imagej.net/</a> and click the GitHub button.<br>
><br>
><br>
> On Thu, May 21, 2015 at 3:01 PM, Michael Schmid <<a href="mailto:schmid@iap.tuwien.ac.at">schmid@iap.tuwien.ac.at</a>> wrote:<br>
> Hi Curtis,<br>
><br>
> thank you!<br>
> My fault was looking at the fiji, not the imagej repository.<br>
><br>
> A quick search for PlugInFilterRunner in the ij1-patcher seems to indicate that the PlugInFilterRunner is not patched.<br>
> I agree that the ij1-patcher is not easy too understand, and I did not find anything that looks like it could cause the problem of Avital.<br>
><br>
> Michael<br>
> ________________________________________________________________<br>
> Michael Schmid email: <a href="mailto:schmid@iap.tuwien.ac.at">schmid@iap.tuwien.ac.at</a><br>
> Institut für Angewandte Physik, Technische Universität Wien<br>
> Wiedner Hauptstr. 8-10/E134, A 1040 Wien, Austria<br>
> Tel. <a href="tel:%2B43%201%2058801-13452" value="+4315880113452">+43 1 58801-13452</a> or -13453, Fax <a href="tel:%2B43%201%2058801%2013499" value="+4315880113499">+43 1 58801 13499</a><br>
> ________________________________________________________________<br>
><br>
> On May 21, 2015, at 21:23, Curtis Rueden wrote:<br>
><br>
> > Hi Michael,<br>
> ><br>
> > > [I must admit, I know nothing about how Fiji modifies ImageJ; in a<br>
> > > quick search I did not find anything on <a href="http://fiji.sc" rel="noreferrer" target="_blank">fiji.sc</a> or the github]<br>
> ><br>
> > The relevant project is:<br>
> > <a href="https://github.com/imagej/ij1-patcher/" rel="noreferrer" target="_blank">https://github.com/imagej/ij1-patcher/</a><br>
> ><br>
> > But digging into it is a substantial endeavor.<br>
> ><br>
> > Regards,<br>
> > Curtis<br>
> ><br>
> > On Thu, May 21, 2015 at 1:35 PM, Michael Schmid <<a href="mailto:schmid@iap.tuwien.ac.at">schmid@iap.tuwien.ac.at</a>> wrote:<br>
> > Hi Wayne,<br>
> ><br>
> > thank you for finding this out!<br>
> ><br>
> > It must be a strange Fiji bug! When called like this, the Versatile Wand behaves like an ordinary ExtendedPlugInFilter. It uses the ImagePlus passed to the showDialog method, which comes directly from WindowManager.getCurrentImage() executed by the PlugInFilterRunner.<br>
> ><br>
> > [I must admit, I know nothing about how Fiji modifies ImageJ; in a quick search I did not find anything on <a href="http://fiji.sc" rel="noreferrer" target="_blank">fiji.sc</a> or the github]<br>
> ><br>
> > Best regards,<br>
> ><br>
> > Michael<br>
> > ________________________________________________________________<br>
> > Michael Schmid email: <a href="mailto:schmid@iap.tuwien.ac.at">schmid@iap.tuwien.ac.at</a><br>
> > Institut für Angewandte Physik, Technische Universität Wien<br>
> > Wiedner Hauptstr. 8-10/E134, A 1040 Wien, Austria<br>
> > Tel. <a href="tel:%2B43%201%2058801-13452" value="+4315880113452">+43 1 58801-13452</a> or -13453, Fax <a href="tel:%2B43%201%2058801%2013499" value="+4315880113499">+43 1 58801 13499</a><br>
> > ________________________________________________________________<br>
> ><br>
> > On May 21, 2015, at 18:54, Rasband, Wayne (NIH/NIMH) [E] wrote:<br>
> ><br>
> > > Dear Avital,<br>
> > ><br>
> > > This is a Fiji issue. You should be able to work around it by deleting the file “Versatile_Wand.java" (location is shown in Console error messages), copying Versatile_Wand.class into the Fiji.app/plugins folder, and restarting Fiji. I have attached a copy of Versatile_Wand.class or you can download it from the Versatile Wand webpage.<br>
> > ><br>
> > > Best regards,<br>
> > ><br>
> > > -wayne<br>
> > ><br>
> > ><br>
> > >> On May 21, 2015, at 3:03 AM, Avital Steinberg <<a href="mailto:steinbergavital@GMAIL.COM">steinbergavital@GMAIL.COM</a>> wrote:<br>
> > >><br>
> > >> Hi Wayne,<br>
> > >> When I run your code (in which you create 2 images), I get an error message - ROI manager, "the active image does not have a selection". Also, it didn't form an ROI - the ROI manager is empty.<br>
> > >><br>
> > >> There is also a console window that shows red warnings - I've had it for a long time, ever since I upgraded imageJ. This console shows up both on my mac and also on my Linux machine. I don't remember when it first showed up. It didn't bother me, since everything was working then.<br>
> > >><br>
> > >> Are the attached warning messages related to the problem?<br>
> > >><br>
> > >> Thanks,<br>
> > >> Avital<br>
> > >><br>
> > >> On Wed, May 20, 2015 at 6:42 PM, Rasband, Wayne (NIH/NIMH) [E] <<a href="mailto:rasbandw@mail.nih.gov">rasbandw@mail.nih.gov</a>> wrote:<br>
> > >> Dear Avital,<br>
> > >><br>
> > >> The following version of your test macro creates a selection in the saved image.<br>
> > >><br>
> > >> Best regards,<br>
> > >><br>
> > >> -wayne<br>
> > >><br>
> > >> setBatchMode(true);<br>
> > >> newImage("Untitled", "8-bit ramp", 500, 500, 1);<br>
> > >> image1ID = getImageID();<br>
> > >> newImage("Untitled", "8-bit ramp", 500, 500, 1);<br>
> > >> image2ID = getImageID();<br>
> > >> selectImage(image1ID);<br>
> > >> if(isActive(image1ID))<br>
> > >> print("The first image is active");<br>
> > >> else<br>
> > >> print("The first image isn't active");<br>
> > >> if (isActive(image2ID))<br>
> > >> print("The second image is active");<br>
> > >> else<br>
> > >> print("The second image isn't active");<br>
> > >> run("Gaussian Blur...", "sigma=2");<br>
> > >> run("Set Scale...", "distance=0");<br>
> > >> run("Versatile Wand", "value=60 color=-100 gradient=10 connectedness=8-connected x=2 y=2 do");<br>
> > >> run("ROI Manager...");<br>
> > >> roiManager("Add");<br>
> > >> saveAs("tiff", getDirectory("home")+"test.tif”)<br>
> > >><br>
> > >><br>
> > >>> On May 20, 2015, at 5:35 AM, Avital Steinberg <<a href="mailto:steinbergavital@GMAIL.COM">steinbergavital@GMAIL.COM</a>> wrote:<br>
> > >>><br>
> > >>> Thanks, but the problem isn't solved. Can anyone else check if they're<br>
> > >>> having similar problems running this code? Does this code create a<br>
> > >>> selection in the saved image also for you?<br>
> > >>><br>
> > >>> setBatchMode(true);<br>
> > >>> open();<br>
> > >>> image1ID = getImageID();<br>
> > >>> open();<br>
> > >>> image2ID = getImageID();<br>
> > >>> selectImage(image1ID);<br>
> > >>> if(isActive(image1ID)){<br>
> > >>> print("The first image is active");<br>
> > >>> }<br>
> > >>> else {<br>
> > >>> print("The first image isn't active");<br>
> > >>> }<br>
> > >>><br>
> > >>> if(isActive(image2ID)){<br>
> > >>> print("The second image is active");<br>
> > >>> }<br>
> > >>> else {<br>
> > >>> print("The second image isn't active");<br>
> > >>> }<br>
> > >>> makePoint(1854, 726);<br>
> > >>> run("Gaussian Blur...", "sigma=2");<br>
> > >>> run("Set Scale...", "distance=0");<br>
> > >>> run("Versatile Wand", "value=60 color=-100 gradient=10<br>
> > >>> connectedness=8-connected x=2 y=2 do");<br>
> > >>> run("ROI Manager...");<br>
> > >>> roiManager("Add");<br>
> > >>> saveAs("Tiff");<br>
> > >>><br>
> > >>><br>
> > >>> I am using ImageJ 1.49t7, which came with Java 1.6.0_065 (64 bit). I am<br>
> > >>> running it on a mac, but I had the same problems also on a Linux machine<br>
> > >>> with ImageJ 1.49s and java 1.6.0_24.<br>
> > >>><br>
> > >>> MakePoint isn't needed, but it's besides the point, since the bug has<br>
> > >>> nothing to do with it and exists also without it.<br>
> > >>><br>
> > >>> Thanks,<br>
> > >>> Avital<br>
> > >>><br>
> > >>> On Tue, May 19, 2015 at 6:25 PM, Michael Schmid <<a href="mailto:schmid@iap.tuwien.ac.at">schmid@iap.tuwien.ac.at</a>><br>
> > >>> wrote:<br>
> > >>><br>
> > >>>> Hi Avital,<br>
> > >>>><br>
> > >>>> sorry, I can't reproduce the problem. Your macro works; it blurs the first<br>
> > >>>> image and does the wand selection on it. I also get the selection in the<br>
> > >>>> ROI Manager.<br>
> > >>>> I tried with both 8-bit grayscale as well as RGB images.<br>
> > >>>><br>
> > >>>> What I don't understand is the "makePoint(1854, 726)" command; Gaussian<br>
> > >>>> Blur does not care about point selections. So it blurs the whole image.<br>
> > >>>><br>
> > >>>> I am using ImageJ 1.49u4, Java 1.6.0_45.<br>
> > >>>><br>
> > >>>> Michael<br>
> > >>>> ________________________________________________________________<br>
> > >>>> On May 19, 2015, at 17:01, Avital Steinberg wrote:<br>
> > >>>><br>
> > >>>>> Hi,<br>
> > >>>>> I'm trying to use Versatile Wand in batch mode. The following macro works<br>
> > >>>>> well in batch mode:<br>
> > >>>>><br>
> > >>>>> setBatchMode(true);<br>
> > >>>>> open();<br>
> > >>>>> makePoint(1854, 726);<br>
> > >>>>> run("Gaussian Blur...", "sigma=2");<br>
> > >>>>> run("Set Scale...", "distance=0");<br>
> > >>>>> run("Versatile Wand", "value=60 color=-100 gradient=10<br>
> > >>>>> connectedness=8-connected x=2 y=2 do");<br>
> > >>>>> run("ROI Manager...");<br>
> > >>>>> roiManager("Add");<br>
> > >>>>> saveAs("Tiff");<br>
> > >>>>><br>
> > >>>>> However - when I try to work with multiple images, select the active<br>
> > >>>> image<br>
> > >>>>> and then use the Versatile Wand, no selection is created:<br>
> > >>>>><br>
> > >>>>> setBatchMode(true);<br>
> > >>>>> open();<br>
> > >>>>> image1ID = getImageID();<br>
> > >>>>> open();<br>
> > >>>>> image2ID = getImageID();<br>
> > >>>>> selectImage(image1ID);<br>
> > >>>>> if(isActive(image1ID)){<br>
> > >>>>> print("The first image is active");<br>
> > >>>>> }<br>
> > >>>>> else {<br>
> > >>>>> print("The first image isn't active");<br>
> > >>>>> }<br>
> > >>>>><br>
> > >>>>> if(isActive(image2ID)){<br>
> > >>>>> print("The second image is active");<br>
> > >>>>> }<br>
> > >>>>> else {<br>
> > >>>>> print("The second image isn't active");<br>
> > >>>>> }<br>
> > >>>>> makePoint(1854, 726);<br>
> > >>>>> run("Gaussian Blur...", "sigma=2");<br>
> > >>>>> run("Set Scale...", "distance=0");<br>
> > >>>>> run("Versatile Wand", "value=60 color=-100 gradient=10<br>
> > >>>> connectedness=8-connected x=2 y=2 do");<br>
> > >>>>> run("ROI Manager...");<br>
> > >>>>> roiManager("Add");<br>
> > >>>>> saveAs("Tiff");<br>
> > >>>>><br>
> > >>>>> Why wouldn't this script work? Only one image is active.<br>
> > >>>>><br>
> > >>>>> Thank you,<br>
> > >>>>> Avital<br>
> > >>>><br>
> > >>>> --<br>
> > >>>> ImageJ mailing list: <a href="http://imagej.nih.gov/ij/list.html" rel="noreferrer" target="_blank">http://imagej.nih.gov/ij/list.html</a><br>
> > >>>><br>
> > >>><br>
> > >>> --<br>
> > >>> ImageJ mailing list: <a href="http://imagej.nih.gov/ij/list.html" rel="noreferrer" target="_blank">http://imagej.nih.gov/ij/list.html</a><br>
> > >><br>
> > >><br>
> > >> <OutputWindowsWaynesCode.jpg><ConsoleWindowRedWarnings.jpg><br>
> > ><br>
> > > <Versatile_Wand.class><br>
> ><br>
> ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>