Wishlist: GOTO in an ImageJ macro

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

Wishlist: GOTO in an ImageJ macro

Daddymoen
If there is a separate web page for posting Wishlist items my first wish would be to know how to find it.  In the old days BASIC had a GOTO(line number) command.  There are some situations where it would make macro programming so much easier to have that command instead of the lame-Function-kind-of-useful-command.  That's my second wish.  My third is to have a real array command that allows at least a 2D array, without using the present, also lame, work around.

Daddymoen
Imagination is more important than knowledge.  Albert Einstein
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Herbie
Daddymoen,

not only on the IJ-Forum but now on this list...

1.
-- Wishlist
Not that I know of...
Concerning reproducible bugs, there are always open ears and rapidly
reacting coding hands on this list.

2.
-- GOTO(line number)
Using GOTO(line number) leads to spaghetti code and is difficult to
maintain.
This is no new argument and reflected by all serious languages.
I'm sure that you won't see GOTO(line number) in the IJ-macro language
or in any other modern scripting language.
What do you mean by lame?
Why is the use of functions lame?

3.
-- 2D array
You may use Java!
Could you be more specific for which purpose you need 2D-arrays in
IJ-macros.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::
Am 30.01.16 um 05:38 schrieb Daddymoen:

> If there is a separate web page for posting Wishlist items my first wish
> would be to know how to find it.  In the old days BASIC had a GOTO(line
> number) command.  There are some situations where it would make macro
> programming so much easier to have that command instead of the
> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
> to have a real array command that allows at least a 2D array, without using
> the present, also lame, work around.
>
> Daddymoen
>
>
>
> -----
> Imagination is more important than knowledge.  Albert Einstein
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Wishlist-GOTO-in-an-ImageJ-macro-tp5015489.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Kenneth Sloan-2
The history of scripting languages is that they add features until they become useless as scripting languages (and, in the process, become clumsy and badly designed programming languages).  

I have always told students: as soon as you find a “missing feature” in your favorite scripting language, it’s time for you to consider a real, full-fledged programming language”.

Herbie finally gets to the point: use Java.  It has everything you asked for, (well, still no GoTo - that would be wrong - but more than enough flow of control features for anyone).

IJ currently has a nice balance of a *simple* scripting language AND a full fledged programming language.  It would be a mistake to modify the scripting language until it has all the features of Java.  Then, someone would have to add a lightweight scripting language!  And the wheel would turn again…

Just Say No to creeping featurism.


Kenneth Sloan
[hidden email] <mailto:[hidden email]>
Vision is the art of seeing what is invisible to others.

> On Jan 31, 2016, at 08:32, Herbie <[hidden email]> wrote:
>
> Daddymoen,
>
> not only on the IJ-Forum but now on this list...
>
> 1.
> -- Wishlist
> Not that I know of...
> Concerning reproducible bugs, there are always open ears and rapidly reacting coding hands on this list.
>
> 2.
> -- GOTO(line number)
> Using GOTO(line number) leads to spaghetti code and is difficult to maintain.
> This is no new argument and reflected by all serious languages.
> I'm sure that you won't see GOTO(line number) in the IJ-macro language or in any other modern scripting language.
> What do you mean by lame?
> Why is the use of functions lame?
>
> 3.
> -- 2D array
> You may use Java!
> Could you be more specific for which purpose you need 2D-arrays in IJ-macros.
>
> Best
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::
> Am 30.01.16 um 05:38 schrieb Daddymoen:
>> If there is a separate web page for posting Wishlist items my first wish
>> would be to know how to find it.  In the old days BASIC had a GOTO(line
>> number) command.  There are some situations where it would make macro
>> programming so much easier to have that command instead of the
>> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
>> to have a real array command that allows at least a 2D array, without using
>> the present, also lame, work around.
>>
>> Daddymoen
>>
>>
>>
>> -----
>> Imagination is more important than knowledge.  Albert Einstein
>> --
>> View this message in context: http://imagej.1557.x6.nabble.com/Wishlist-GOTO-in-an-ImageJ-macro-tp5015489.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Michael Schmid
In reply to this post by Daddymoen
On Sat, January 30, 2016 05:38, Daddymoen wrote:
> If there is a separate web page for posting Wishlist items my first wish
> would be to know how to find it.  In the old days BASIC had a GOTO(line
> number) command.  There are some situations where it would make macro
> programming so much easier to have that command instead of the
> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
> to have a real array command that allows at least a 2D array, without
> using the present, also lame, work around.

Hi Daddymoen,

there are good reasons for not having GOTO:
  https://en.wikipedia.org/wiki/Goto

Concerning 2D arrays, simply create a 32-bit image in BatchMode (so the
image does not get displayed).
This gives you a 2D array that can be addressed with setPixel(x, y, value)
and getPixel(x, y).  Using an image instead of an array, you get a number
of operations for free, e.g. arithmetic operations on each array element
(Process>Math) and arithmetic element-by-element operations of two 2D
arrays (Image Calculator). I don't think that creating an image is slower
(more lame) than creating a large 2D array in Java.
The main restriction is that images use only 32-bit floats, while the
macro language uses numbers with 64 bits precision.

Michael

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

ctrueden
In reply to this post by Daddymoen
Hi Daddymoen,

In addition to the other suggestions, have a look at the many other
scripting languages available with ImageJ:

http://imagej.net/Scripting

Regards,
Curtis
On Jan 31, 2016 8:17 AM, "Daddymoen" <[hidden email]> wrote:

> If there is a separate web page for posting Wishlist items my first wish
> would be to know how to find it.  In the old days BASIC had a GOTO(line
> number) command.  There are some situations where it would make macro
> programming so much easier to have that command instead of the
> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
> to have a real array command that allows at least a 2D array, without using
> the present, also lame, work around.
>
> Daddymoen
>
>
>
> -----
> Imagination is more important than knowledge.  Albert Einstein
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Wishlist-GOTO-in-an-ImageJ-macro-tp5015489.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Herbie
Good Sunday Curtis,

I fear none of the "other scripting languages available with ImageJ"
support GOTO(line number) -- do they?

However, this was the foremost wish of Daddymoen that he expressed
before on the IJ-Forum already.

2D arrays are a different topic and of course they are supported by
other scripting languages, but, if Java is not a choice, I would also
recommend the IJ-macro approach forwarded by Michael.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 31.01.16 um 18:07 schrieb Curtis Rueden:

> Hi Daddymoen,
>
> In addition to the other suggestions, have a look at the many other
> scripting languages available with ImageJ:
>
> http://imagej.net/Scripting
>
> Regards,
> Curtis
> On Jan 31, 2016 8:17 AM, "Daddymoen" <[hidden email]> wrote:
>
>> If there is a separate web page for posting Wishlist items my first wish
>> would be to know how to find it.  In the old days BASIC had a GOTO(line
>> number) command.  There are some situations where it would make macro
>> programming so much easier to have that command instead of the
>> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
>> to have a real array command that allows at least a 2D array, without using
>> the present, also lame, work around.
>>
>> Daddymoen
>>
>>
>>
>> -----
>> Imagination is more important than knowledge.  Albert Einstein
>> --
>> View this message in context:
>> http://imagej.1557.x6.nabble.com/Wishlist-GOTO-in-an-ImageJ-macro-tp5015489.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Jan Eglinger
Hi all,

On 31.01.2016 19:03, Herbie wrote:
> I fear none of the "other scripting languages available with ImageJ"
> support GOTO(line number) -- do they?

No, they don't, but they all offer a full-fledged flow control (and
they're easier to use than Java for many people).


> However, this was the foremost wish of Daddymoen that he expressed
> before on the IJ-Forum already.

Unfortunately, people on this list keep referring to things without
linking them (to facilitate others following the discussion), so I'm
adding the link here for reference:

http://forum.imagej.net/t/does-imagej-fiji-macro-have-a-goto-eqivalent/591


Cheers,
Jan


>
> :::::::::::::::::::::::::::::::::::::::::::
> Am 31.01.16 um 18:07 schrieb Curtis Rueden:
>> Hi Daddymoen,
>>
>> In addition to the other suggestions, have a look at the many other
>> scripting languages available with ImageJ:
>>
>> http://imagej.net/Scripting
>>
>> Regards,
>> Curtis
>> On Jan 31, 2016 8:17 AM, "Daddymoen" <[hidden email]> wrote:
>>
>>> If there is a separate web page for posting Wishlist items my first wish
>>> would be to know how to find it.  In the old days BASIC had a GOTO(line
>>> number) command.  There are some situations where it would make macro
>>> programming so much easier to have that command instead of the
>>> lame-Function-kind-of-useful-command.  That's my second wish.  My
>>> third is
>>> to have a real array command that allows at least a 2D array, without
>>> using
>>> the present, also lame, work around.
>>>
>>> Daddymoen
>>>
>>>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Wishlist: GOTO in an ImageJ macro

Mike Ingle
In reply to this post by Daddymoen
Daddymoen,

A matter of civility.  It will not help your cause with the developers to
accuse their product as being "lame".

Best Regards,

Mike

On Sat, Jan 30, 2016 at 5:38 AM, Daddymoen <[hidden email]> wrote:

> If there is a separate web page for posting Wishlist items my first wish
> would be to know how to find it.  In the old days BASIC had a GOTO(line
> number) command.  There are some situations where it would make macro
> programming so much easier to have that command instead of the
> lame-Function-kind-of-useful-command.  That's my second wish.  My third is
> to have a real array command that allows at least a 2D array, without using
> the present, also lame, work around.
>
> Daddymoen
>
>
>
> -----
> Imagination is more important than knowledge.  Albert Einstein
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Wishlist-GOTO-in-an-ImageJ-macro-tp5015489.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html