Posted by
CARL Philippe (LBP) on
URL: http://imagej.273.s1.nabble.com/Radial-profile-ext-to-work-with-Macros-tp5005598p5006129.html
Dear all,
Following the request a couple of months ago of macros implementation of the Radial profile ext plugin, I have submitted a version to Wayne who has updated it on the ImageJ website.
http://imagej.nih.gov/ij/plugins/radial-profile-ext.htmlThis version takes into account the bug correction found and discussed by Kota Miura.
It also and especially introduces several new functionalities which are the results of some fruitful back and forth discussions with Michael Schmid which lasted over several days and from which I learned really a lot.
Thus I would like to specially thank him here.
Thus enjoy and feel free to contact me again about this plugin or other purposes.
Best regards
Philippe
Philippe CARL
Laboratoire de Biophotonique et Pharmacologie
UMR 7213 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84
-----Message d'origine-----
De : ImageJ Interest Group [mailto:
[hidden email]] De la part de Jan Eglinger
Envoyé : mardi 3 décembre 2013 12:12
À :
[hidden email]
Objet : Re: Radial profile ext to work with Macros
Dear Philippe, Kota and all,
On 03.12.2013, 9:47 AM, Philippe CARL wrote:
> Dear all,
> To say the truth the "Radial profile ext" was actually the very first plugin I had ever written under ImageJ, in what seems to me now to be almost an eternity ago.
> And in this times I absolutely needed such a sharp tool in order to quantify some RICM pictures in a certain way for generating a part of a publication.
> Also I had indeed not written the plugin for a macro (I even didn't know how to program macros at this time) use and the code may probably be quite improved.
> So what I can propose is to look over the code in general to try to improve it, extend its capabilities for macros, look for the bug correction Kota made (this bug is quite probably as well within the "Radial profile ext" plugin) and then post this new plugin on a site for you guys to download and try it.
> And if everybody agrees on the update we can then contact Wayne for him to update the posted code on the ImageJ website.
> Thus please allow me a couple days (= 2-3) for doing this.
Since Kota has made his plugin so nicely available via github, I would suggest that you fork that project and open a pull request with your changes [*1*]. (Since recently, you can even edit the files online, making it very easy to contribute.) That will also permit others (devlopers but also advanced users of the
plugin) to contribute small changes if necessary.
> Also I would like to ask whether the new plugin update and evaluation discussion should rather be continued within the ImageJ list or rather outside, in private, until a new updated plugin is available?
After all, the plugin is made for its users, so I suggest that the discussion about possible enhancements stays on this list.
Cheers,
Jan
[*1*]:
https://help.github.com/articles/using-pull-requests> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:
[hidden email]] De la part de
> Kota Miura Envoyé : lundi 2 décembre 2013 13:42 À :
>
[hidden email] Objet : Re: Radial profile ext to work with Macros
>
> Hi Matt, Carl, Jan & all,
>
>
>
> On Mon, Dec 2, 2013 at 1:02 PM, Jan Eglinger <
[hidden email]> wrote:
>
>> Dear Matt,
>>
>>> Any ideas?
>>>
>>
>> your original post was not accepted by the mailing list [1],
>> presumably because you didn't confirm it. That might be a reason why
>> you didn't get an answer for a little while.
>>
>> I am copying some of your original question here for the convenience
>> of readers joining the discussion at a later point.
>>
>>> I have very limited experience with Java and I was wondering if
>>> someone had updated the Radial profile EXT plugin to enable macros
>>> to work with it? More specifically, its the Radial profile angle
>>> plugin, which was posted in 2006 and hasn't been updated since.
>>>
http://rsb.info.nih.gov/ij/plugins/radial-profile-ext.html>>
>> Since the plugin makes use of ImageJ's GenericDialog in a
>> non-standard way to create its own user interface (thereby preventing
>> the built-in recordability of the command), you have to resort to one
>> of the more powerful scripting languages like Javascript [2] or
>> Python [3] to interact with the plugin from within a macro.
>>
>> In addition the Radial_Profile_Angle_Ext class tightly couples
>> parameter initialization with the display of its dialog. I'd suggest
>> to add a helper method setParameters(Sa, Ia, X0, Y0, mR) to the plugin, such as:
>>
>> public void setParameters(int mSa, int mIa, Double mX0,
>> Double mY0, Double mmR) {
>> Sa = mSa;
>> Ia = mIa;
>> X0 = mX0;
>> Y0 = mY0;
>> mR = mmR;
>> setCosSin();
>> }
>>
>> (mind the line breaks introduced by the mailer)
>>
>> After adding the above code and compiling the java file via "Compile
>> and Run", you should be able to execute the following javascript
>> (with an image open and any active selection):
>>
>> importClass(Packages.Radial_Profile_Angle_Ext);
>>
>> rp = new Radial_Profile_Angle_Ext();
>> imp = IJ.getImage();
>> ip = imp.getProcessor();
>> rp.setup("", imp);
>> rp.setParameters(180, 40, 77.5, 108.5, 57.5);
>> rp.doRadialDistribution(ip);
>>
>> and you should see a profile plot without any dialog showing up.
>>
>> Hope that helps,
>> Jan
>>
>>
>>
>>
>> [1]:
http://imagej.1557.x6.nabble.com/Radial-profile-ext-to->> work-with-Macros-td5005598.html
>> [2]:
http://fiji.sc/Javascript_Scripting>> [3]:
http://fiji.sc/Jython_Scripting>>
>>
>
> here is another upgraded version of the Radial Profile plugin,
>
>
https://github.com/cmci/RadialProfileV2/tree/master/target>
>
> that allows having options to the macro command e.g.
>
> run("Radial Profile", "x=148 y=125 radius=80");
>
> Original version had some bug in the measurement for the value in the last index of the profile, and this is fixed in my version as well.
>
> Maybe Carl's extended version could be merged at some point.
>
> Cheers,
>
> Kota
>
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html