Large macro files

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

Large macro files

Norman Kirkby
Dear All

Please excuse a possibly idiot question:

I am writing an ImageJ macro file from a Fortran program in order to
visualise the growth of some simulated filamentous bacteria.  There are
eventually quite a large number of elements to draw for each of many
particles on each slice of the animation.

Small simulations work fine.

Larger simulations, when run in ImageJ, present me with a window headed
'Macro Error', with the message 'Number or numeric function expected in line
8176' followed by an incomplete drawline command.  The reported error for
that line does not exist in the macro .txt file.  I have tried putting more
than one command on a line and the error seems to occur after a fixed number
of commands (not after a fixed number of lines of the macro file).

Is this a bug?
Is there a configuration switch or command that will allow ImageJ to accept
larger macros?
Is there a better way to generate these animations (e.g. should I put the
drawline commands for each slice in a separate file, then write a macro
which calls each slice file in in turn?)

Many thanks, in anticipation

--
Dr Norman Kirkby
([hidden email])
Senior Lecturer in Chemical Engineering
School of Engineering (D2)
University of Surrey
Guildford, Surrey, GU2 7XH
Phone 01483 686577 Fax   01483 686581
Reply | Threaded
Open this post in threaded view
|

Antwort: Large macro files

Joachim Wesner
Hi,

what do you mean by "larger simulations"= A larger (longer, more
sourcelines) sourcecode ore running the same code with a larger datset,
larger arrays etc.?

Just a hint:

I noticed that the macro interpreter is pretty forgiving with respect to
missing semicolons (i.e. there are already missing ones, but it still runs
"flawlessly), up to a certain point when you extend the source further and
it suddenly breaks down and it gives you a very strange error at totally
unrelated point in your source. Did you check that all semicolons are
there?

Joachim



|---------+--------------------------->
|         |           Norman Kirkby   |
|         |           <norman.kirkby@G|
|         |           MAIL.COM>       |
|         |           Gesendet von:   |
|         |           ImageJ Interest |
|         |           Group           |
|         |           <[hidden email]|
|         |           .GOV>           |
|         |                           |
|         |                           |
|         |           08.05.2006 13:46|
|         |           Bitte antworten |
|         |           an ImageJ       |
|         |           Interest Group  |
|---------+--------------------------->
  >-------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                               |
  |        An:      [hidden email]                                                                                           |
  |        Kopie:                                                                                                                 |
  |        Thema:   Large macro files                                                                                             |
  >-------------------------------------------------------------------------------------------------------------------------------|




Dear All

Please excuse a possibly idiot question:

I am writing an ImageJ macro file from a Fortran program in order to
visualise the growth of some simulated filamentous bacteria.  There are
eventually quite a large number of elements to draw for each of many
particles on each slice of the animation.

Small simulations work fine.

Larger simulations, when run in ImageJ, present me with a window headed
'Macro Error', with the message 'Number or numeric function expected in
line
8176' followed by an incomplete drawline command.  The reported error for
that line does not exist in the macro .txt file.  I have tried putting more
than one command on a line and the error seems to occur after a fixed
number
of commands (not after a fixed number of lines of the macro file).

Is this a bug?
Is there a configuration switch or command that will allow ImageJ to accept
larger macros?
Is there a better way to generate these animations (e.g. should I put the
drawline commands for each slice in a separate file, then write a macro
which calls each slice file in in turn?)

Many thanks, in anticipation

--
Dr Norman Kirkby
([hidden email])
Senior Lecturer in Chemical Engineering
School of Engineering (D2)
University of Surrey
Guildford, Surrey, GU2 7XH
Phone 01483 686577 Fax   01483 686581



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Large macro files

Norman Kirkby
Dear Joachim

Thanks

Larger = more drawline instructions, about 10,500 of them

Every instruction is terminated with a semi-colon

I have sent Wayne a sample file.

Norman

On 5/8/06, Joachim Wesner <[hidden email]> wrote:

>
> Hi,
>
> what do you mean by "larger simulations"= A larger (longer, more
> sourcelines) sourcecode ore running the same code with a larger datset,
> larger arrays etc.?
>
> Just a hint:
>
> I noticed that the macro interpreter is pretty forgiving with respect to
> missing semicolons (i.e. there are already missing ones, but it still runs
> "flawlessly), up to a certain point when you extend the source further and
> it suddenly breaks down and it gives you a very strange error at totally
> unrelated point in your source. Did you check that all semicolons are
> there?
>
> Joachim
>
>
>
> |---------+--------------------------->
> |         |           Norman Kirkby   |
> |         |           <norman.kirkby@G|
> |         |           MAIL.COM>       |
> |         |           Gesendet von:   |
> |         |           ImageJ Interest |
> |         |           Group           |
> |         |           <[hidden email]|
> |         |           .GOV>           |
> |         |                           |
> |         |                           |
> |         |           08.05.2006 13:46|
> |         |           Bitte antworten |
> |         |           an ImageJ       |
> |         |           Interest Group  |
> |---------+--------------------------->
>
>   >-------------------------------------------------------------------------------------------------------------------------------|
>   |
> |
>   |        An:      [hidden email]
> |
>   |        Kopie:
> |
>   |        Thema:   Large macro
> files
> |
>
>   >-------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>
> Dear All
>
> Please excuse a possibly idiot question:
>
> I am writing an ImageJ macro file from a Fortran program in order to
> visualise the growth of some simulated filamentous bacteria.  There are
> eventually quite a large number of elements to draw for each of many
> particles on each slice of the animation.
>
> Small simulations work fine.
>
> Larger simulations, when run in ImageJ, present me with a window headed
> 'Macro Error', with the message 'Number or numeric function expected in
> line
> 8176' followed by an incomplete drawline command.  The reported error for
> that line does not exist in the macro .txt file.  I have tried putting
> more
> than one command on a line and the error seems to occur after a fixed
> number
> of commands (not after a fixed number of lines of the macro file).
>
> Is this a bug?
> Is there a configuration switch or command that will allow ImageJ to
> accept
> larger macros?
> Is there a better way to generate these animations (e.g. should I put the
> drawline commands for each slice in a separate file, then write a macro
> which calls each slice file in in turn?)
>
> Many thanks, in anticipation
>
> --
> Dr Norman Kirkby
> ([hidden email])
> Senior Lecturer in Chemical Engineering
> School of Engineering (D2)
> University of Surrey
> Guildford, Surrey, GU2 7XH
> Phone 01483 686577 Fax   01483 686581
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>



--
Dr Norman Kirkby
([hidden email])
Senior Lecturer in Chemical Engineering
School of Engineering (D2)
University of Surrey
Guildford, Surrey, GU2 7XH
Phone 01483 686577 Fax   01483 686581
Reply | Threaded
Open this post in threaded view
|

Re: Large macro files

Smiley, John
I have a related question. I have been translating some lengthy macros from Object-Image to ImageJ.   However, I have not found an easy way to navigate through sets of macros in ImageJ.  There is the menu command "Edit/go to line", but this is cumbersome.  

Does someone know a way better way, for example how to navigate the macros by title? Will this be a feature of the macro debugger listed in the "planned features"?

Thanks, John Smiley

> ----------
> From: ImageJ Interest Group on behalf of Norman Kirkby
> Reply To: ImageJ Interest Group
> Sent: Monday, May 8, 2006 6:50 AM
> To: [hidden email]
> Subject: Re: Large macro files
>
> Dear Joachim
>
> Thanks
>
> Larger = more drawline instructions, about 10,500 of them
>
> Every instruction is terminated with a semi-colon
>
> I have sent Wayne a sample file.
>
> Norman
>
> On 5/8/06, Joachim Wesner <[hidden email]> wrote:
> >
> > Hi,
> >
> > what do you mean by "larger simulations"= A larger (longer, more
> > sourcelines) sourcecode ore running the same code with a larger datset,
> > larger arrays etc.?
> >
> > Just a hint:
> >
> > I noticed that the macro interpreter is pretty forgiving with respect to
> > missing semicolons (i.e. there are already missing ones, but it still runs
> > "flawlessly), up to a certain point when you extend the source further and
> > it suddenly breaks down and it gives you a very strange error at totally
> > unrelated point in your source. Did you check that all semicolons are
> > there?
> >
> > Joachim
> >
> >
> >
> > |---------+--------------------------->
> > |         |           Norman Kirkby   |
> > |         |           <norman.kirkby@G|
> > |         |           MAIL.COM>       |
> > |         |           Gesendet von:   |
> > |         |           ImageJ Interest |
> > |         |           Group           |
> > |         |           <[hidden email]|
> > |         |           .GOV>           |
> > |         |                           |
> > |         |                           |
> > |         |           08.05.2006 13:46|
> > |         |           Bitte antworten |
> > |         |           an ImageJ       |
> > |         |           Interest Group  |
> > |---------+--------------------------->
> >
> >   >-------------------------------------------------------------------------------------------------------------------------------|
> >   |
> > |
> >   |        An:      [hidden email]
> > |
> >   |        Kopie:
> > |
> >   |        Thema:   Large macro
> > files
> > |
> >
> >   >-------------------------------------------------------------------------------------------------------------------------------|
> >
> >
> >
> >
> > Dear All
> >
> > Please excuse a possibly idiot question:
> >
> > I am writing an ImageJ macro file from a Fortran program in order to
> > visualise the growth of some simulated filamentous bacteria.  There are
> > eventually quite a large number of elements to draw for each of many
> > particles on each slice of the animation.
> >
> > Small simulations work fine.
> >
> > Larger simulations, when run in ImageJ, present me with a window headed
> > 'Macro Error', with the message 'Number or numeric function expected in
> > line
> > 8176' followed by an incomplete drawline command.  The reported error for
> > that line does not exist in the macro .txt file.  I have tried putting
> > more
> > than one command on a line and the error seems to occur after a fixed
> > number
> > of commands (not after a fixed number of lines of the macro file).
> >
> > Is this a bug?
> > Is there a configuration switch or command that will allow ImageJ to
> > accept
> > larger macros?
> > Is there a better way to generate these animations (e.g. should I put the
> > drawline commands for each slice in a separate file, then write a macro
> > which calls each slice file in in turn?)
> >
> > Many thanks, in anticipation
> >
> > --
> > Dr Norman Kirkby>
> > ([hidden email])
> > Senior Lecturer in Chemical Engineering
> > School of Engineering (D2)
> > University of Surrey
> > Guildford, Surrey, GU2 7XH
> > Phone 01483 686577 Fax   01483 686581
> >
> >
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> > ______________________________________________________________________
> >
>
>
>
> --
> Dr Norman Kirkby
> ([hidden email])
> Senior Lecturer in Chemical Engineering
> School of Engineering (D2)
> University of Surrey
> Guildford, Surrey, GU2 7XH
> Phone 01483 686577 Fax   01483 686581
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Large macro files

Wayne Rasband
In reply to this post by Norman Kirkby
This is fixed in ImageJ 1.37g. V1.37g increases the maximum size of the
macro symbol table from 32,768 to 524,288.

-wayne


On May 8, 2006, at 7:46 AM, Norman Kirkby wrote:

> Dear All
>
> Please excuse a possibly idiot question:
>
> I am writing an ImageJ macro file from a Fortran program in order to
> visualise the growth of some simulated filamentous bacteria.  There are
> eventually quite a large number of elements to draw for each of many
> particles on each slice of the animation.
>
> Small simulations work fine.
>
> Larger simulations, when run in ImageJ, present me with a window headed
> 'Macro Error', with the message 'Number or numeric function expected
> in line
> 8176' followed by an incomplete drawline command.  The reported error
> for
> that line does not exist in the macro .txt file.  I have tried putting
> more
> than one command on a line and the error seems to occur after a fixed
> number
> of commands (not after a fixed number of lines of the macro file).
>
> Is this a bug?
> Is there a configuration switch or command that will allow ImageJ to
> accept
> larger macros?
> Is there a better way to generate these animations (e.g. should I put
> the
> drawline commands for each slice in a separate file, then write a macro
> which calls each slice file in in turn?)
>
> Many thanks, in anticipation
>
> --
> Dr Norman Kirkby
> ([hidden email])
> Senior Lecturer in Chemical Engineering
> School of Engineering (D2)
> University of Surrey
> Guildford, Surrey, GU2 7XH
> Phone 01483 686577 Fax   01483 686581
>