(no subject)

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

(no subject)

Sanneke Brinkers
Dear All,

 

Lately, I have begun using macro's in ImageJ to process my images. When I
run my macro, I use the ICS-opener to open three channel .ics files. In a
for-loop, I select the windows of different channels by creating a string of
the filename + the iteration count and using the "selectWindow" function.
All goes well, but once in a while, the macro stops at a random image, for
example at image 25 ch 1, giving the error message: "image 25 ch 1.0 not
found". So it seems to put a ".0" behind the number in the for-loop and
tries to find an image-window with that name which doesn't exist.

 

This error is hard to reproduce and occurs only once in a while, so I
thought it might be a memory issue. I have configured ImageJ to use 1 GB of
memory and when the error occurs, this memory is not completely filled. I
have the following system configuration:

 

Dual Opteron 250 (AMD 2.4GHz) with 4 GB memory

Suse Linux 9.2 operating system

ImageJ 1.35p with java 1.5.0_04

I do not use the macro in batch mode

 

Anyone any idea?

 

Thank you in advance!

 

Best Regards,

 

Sanneke

 

===========================

Sanneke Brinkers

BioPhysical Engineering (BPE)

Faculty of Science and Technology

University of Twente

P.O. Box 217

7500 AE Enschede

The Netherlands

P: +31 53 489 3867

F: +31 53 489 1105

E:  <mailto:[hidden email]> [hidden email]

I:  <http://bpe.tnw.utwente.nl> http://bpe.tnw.utwente.nl

 
Reply | Threaded
Open this post in threaded view
|

(no subject)

Gabriel Landini
On Thursday 16 February 2006 12:45, Sanneke Brinkers wrote:
> Lately, I have begun using macro's in ImageJ to process my images. When I
> run my macro, I use the ICS-opener to open three channel .ics files. In a
> for-loop, I select the windows of different channels by creating a string
> of the filename + the iteration count and using the "selectWindow"
> function. All goes well, but once in a while, the macro stops at a random
> image, for example at image 25 ch 1, giving the error message: "image 25 ch
> 1.0 not found". So it seems to put a ".0" behind the number in the for-loop
> and tries to find an image-window with that name which doesn't exist.

Have you tried putting some delays between the creation of a new image and the
use of it?
I had had a vaguely similar problem with the List_LUTs plugin. I mentioned to
Wayne, but it seems to happen only in linux.

Cheers,

G.
Reply | Threaded
Open this post in threaded view
|

Re: Generating file names in macros

Wayne Rasband
In reply to this post by Sanneke Brinkers
> Lately, I have begun using macro's in ImageJ to process my
> images. When I run my macro, I use the ICS-opener to open
> three channel .ics files. In a for-loop, I select the
> windows of different channels by creating a string of the
> filename + the iteration count and using the "selectWindow"
> function. All goes well, but once in a while, the macro
> stops at a random image, for example at image 25 ch 1,
> giving the error message: "image 25 ch 1.0 not found". So it
> seems to put a ".0" behind the number in the for-loop and
> tries to find an image-window with that name which doesn't
> exist.

You should be able to avoid this problem by using

     selectWindow(filename+d2s(i,0));

instead of

     selectWindow(filename+i);

The dts (double to string) function converts a number into a string
using a specified number of decimal places.

-wayne