How to obtain daily build version

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

How to obtain daily build version

vischer
Hello,

I need to make sure that IJ version is >= "1.46n13".

Although "About ImageJ" shows "1.46n13", version returns "1.46n".
Is there a way to extract "1.46n13" ?

regards,
Norbert Vischer
Reply | Threaded
Open this post in threaded view
|

Re: How to obtain daily build version

bwl224
I believe it is the same in this situation.  "Version" is just giving you less information than "About ImageJ".  
------Original Message------
From: Norbert Vischer
Sender: ImageJ Interest Group
To: [hidden email]
ReplyTo: ImageJ Interest Group
Subject: How to obtain daily build version
Sent: May 2, 2012 8:06 AM

Hello,

I need to make sure that IJ version is >= "1.46n13".

Although "About ImageJ" shows "1.46n13", version returns "1.46n".
Is there a way to extract "1.46n13" ?

regards,
Norbert Vischer


Sent via BlackBerry by AT&T
Reply | Threaded
Open this post in threaded view
|

Re: How to obtain daily build version

Michael Schmid
In reply to this post by vischer
Hi Norbert,

you can use the following:
  ImageJ imageJ = IJ.getInstance();
imageJ.VERSION then gives you "1.46n"
imageJ.BUILD gives you "13", you have to parse it into an int and do a numeric comparison.

Michael
________________________________________________________________
On May 2, 2012, at 14:06, Norbert Vischer wrote:

> Hello,
>
> I need to make sure that IJ version is >= "1.46n13".
>
> Although "About ImageJ" shows "1.46n13", version returns "1.46n".
> Is there a way to extract "1.46n13" ?
>
> regards,
> Norbert Vischer
Reply | Threaded
Open this post in threaded view
|

Re: How to obtain daily build version

vischer
In reply to this post by vischer
Hello Michael,

thanks for this useful tip!
I managed to get what I want, although somewhat awkward as eval does not give me a return value, so I used the log window. Wayne, perhaps there will be a getVersion("build") command in future?

print("\\Clear");
eval("script", "IJ.getInstance().BUILD");
build = getInfo("log");
buildVersion = getVersion + IJ.pad(parseInt(build), 2);
print("\\Clear");
print("buildVersion =", buildVersion);

output:
=======
buildVersion = 1.46n13


best regards, Norbert

Norbert Vischer
Research Engineer
Centre for Advanced Microscopy
Swammerdam Institute for Life Sciences (SILS)
University of Amsterdam
Science Park 904
1098 XH Amsterdam, the Netherlands