Login  Register

Bug in 1.37j ?

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

Bug in 1.37j ?

lechristophe
I use the getDirectory("image") macro command a lot. However, this
command stopped working with stacks. If you run the below test macro
with a stack, it's not printing the path, although it does it for a
single image :


RepertoireSource=getDirectory("image");
print(RepertoireSource);


Several of my macros stopped working, so I assume something has been
modified in the latest version of ImageJ (1.37j).



On a related topic, I use java 1.6 developper preview on OS X 10.4, and
I noticed that since maybe one or two IJ updates, the open and save
dialogs stopped using default OS X display (with the nice arborescence
navigation) and now display a fugly single-folder java dialog.




Christophe Leterrier
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

Gabriel Landini
On Tuesday 20 February 2007 11:23:22 Christophe Leterrier wrote:
> Several of my macros stopped working, so I assume something has been
> modified in the latest version of ImageJ (1.37j).

Lots of posts about bugs are reported on old versions.
I guess lots of people do not realise that the *installation* download is not
the *latest version*.

You are using a quite old version from June 2006. The latest version is 1.38j.

To save a lot of time, upgrade (from the link below) to the latest version and
check whether the problem hasn't been solved:

http://rsbweb.nih.gov/ij/notes.html

Upgrading to the latest version consists of downloading the ij.jar file in the
ImageJ directory.

> On a related topic, I use java 1.6 developper preview on OS X 10.4, and
> I noticed that since maybe one or two IJ updates, the open and save
> dialogs stopped using default OS X display (with the nice arborescence
> navigation) and now display a fugly single-folder java dialog.

I think that you can choose this in Edit>Options>Input/Output.

Cheers,

G.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

lechristophe
Sorry, my mistake.

It was a typo. I'm using the latest 1.38j I got by downloading the jar file.


Christophe Leterrier


Gabriel Landini a écrit :

> On Tuesday 20 February 2007 11:23:22 Christophe Leterrier wrote:
>> Several of my macros stopped working, so I assume something has been
>> modified in the latest version of ImageJ (1.37j).
>
> Lots of posts about bugs are reported on old versions.
> I guess lots of people do not realise that the *installation* download is not
> the *latest version*.
>
> You are using a quite old version from June 2006. The latest version is 1.38j.
>
> To save a lot of time, upgrade (from the link below) to the latest version and
> check whether the problem hasn't been solved:
>
> http://rsbweb.nih.gov/ij/notes.html
>
> Upgrading to the latest version consists of downloading the ij.jar file in the
> ImageJ directory.
>
>> On a related topic, I use java 1.6 developper preview on OS X 10.4, and
>> I noticed that since maybe one or two IJ updates, the open and save
>> dialogs stopped using default OS X display (with the nice arborescence
>> navigation) and now display a fugly single-folder java dialog.
>
> I think that you can choose this in Edit>Options>Input/Output.
>
> Cheers,
>
> G.
>
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

Gabriel Landini
On Tuesday 20 February 2007 11:42:48 Christophe Leterrier wrote:
> Sorry, my mistake.
>
> It was a typo. I'm using the latest 1.38j I got by downloading the jar
> file.

OK. What is the problem with the macro, can you post an example that does not
work?

Cheers,
G.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

lechristophe
I reformulate my first email with greater details.


1) Open an image (.tif file) (you can close other opened images to
reduce the parameters).

2) Run the following macro :

---- begin code ----

macro "test" {

RepertoireSource=getDirectory("image");
print(RepertoireSource);

}

---- end code ----

The log window will display the path to the open image (without the name
of the image)

3) Close the image, open a stack by opening two images from the same
folder and do a "Images to Stack" command (or "Import > Image Sequence"
command, or "Import > Selected As Stack" command, or any command that
generate a stack).

4) Run the test macro on the active stack. It will display a blank
string, not the path from where the images were open. I can assure you
that it retrieved the path from stacks with previous ImageJ versions.

Christophe Leterrier



Gabriel Landini a écrit :

> On Tuesday 20 February 2007 11:42:48 Christophe Leterrier wrote:
>> Sorry, my mistake.
>>
>> It was a typo. I'm using the latest 1.38j I got by downloading the jar
>> file.
>
> OK. What is the problem with the macro, can you post an example that does not
> work?
>
> Cheers,
> G.
>
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

Gabriel Landini
On Tuesday 20 February 2007 12:02:49 Christophe Leterrier wrote:
> I reformulate my first email with greater details.
>
>
> 1) Open an image (.tif file) (you can close other opened images to
> reduce the parameters).
>
> 2) Run the following macro :

Yes, this works fine.

> 3) Close the image, open a stack by opening two images from the same
> folder and do a "Images to Stack" command (or "Import > Image Sequence"
> command, or "Import > Selected As Stack" command, or any command that
> generate a stack).

> 4) Run the test macro on the active stack. It will display a blank
> string, not the path from where the images were open. I can assure you
> that it retrieved the path from stacks with previous ImageJ versions.

Yes, you are right. It happens in linux too.
After opening each image, the macro still remembers the "image" directory, but
as soon as the are transformed into a stack, the macro does not report
anything.

Hopefully Wayne will see this thread.

Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

Michael Schmid
Hi group,

for each image, the directory where it came from is stored in
the properties of the ImagePlus (that's where the information
displayed by "Show Info..." comes from.

When making a stack out of single images, the information of the
source file cannot be kept because there is no single source
file. The images of a stack could also come from different
directories.

So one should not expect that the directory information is kept,
it could be misleading in case of images from different
directories combined into a single stack.


Michael
________________________________________________________________

On 20 Feb 2007, at 13:10, Gabriel Landini wrote:

> On Tuesday 20 February 2007 12:02:49 Christophe Leterrier wrote:
>> I reformulate my first email with greater details.
>>
>>
>> 1) Open an image (.tif file) (you can close other opened images to
>> reduce the parameters).
>>
>> 2) Run the following macro :
>
> Yes, this works fine.
>
>> 3) Close the image, open a stack by opening two images from the same
>> folder and do a "Images to Stack" command (or "Import > Image  
>> Sequence"
>> command, or "Import > Selected As Stack" command, or any command that
>> generate a stack).
>
>> 4) Run the test macro on the active stack. It will display a blank
>> string, not the path from where the images were open. I can assure  
>> you
>> that it retrieved the path from stacks with previous ImageJ versions.
>
> Yes, you are right. It happens in linux too.
> After opening each image, the macro still remembers the "image"  
> directory, but
> as soon as the are transformed into a stack, the macro does not report
> anything.
>
> Hopefully Wayne will see this thread.
>
> Cheers,
>
> Gabriel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Bug in 1.37j ?

Wayne Rasband
In reply to this post by lechristophe
ImageJ 1.38k will fix a bug that caused getDirectory("image") to fail
on stacks created using Image>Stacks>Convert Images to Stack when all
the source images were loaded from the same directory.

-wayne

On Feb 20, 2007, at 7:02 AM, Christophe Leterrier wrote:

> I reformulate my first email with greater details.
>
>
> 1) Open an image (.tif file) (you can close other opened images to
> reduce the parameters).
>
> 2) Run the following macro :
>
> ---- begin code ----
>
> macro "test" {
>
> RepertoireSource=getDirectory("image");
> print(RepertoireSource);
>
> }
>
> ---- end code ----
>
> The log window will display the path to the open image (without the
> name of the image)
>
> 3) Close the image, open a stack by opening two images from the same
> folder and do a "Images to Stack" command (or "Import > Image
> Sequence" command, or "Import > Selected As Stack" command, or any
> command that generate a stack).
>
> 4) Run the test macro on the active stack. It will display a blank
> string, not the path from where the images were open. I can assure you
> that it retrieved the path from stacks with previous ImageJ versions.
>
> Christophe Leterrier
>
>
>
> Gabriel Landini a écrit :
>> On Tuesday 20 February 2007 11:42:48 Christophe Leterrier wrote:
>>> Sorry, my mistake.
>>>
>>> It was a typo. I'm using the latest 1.38j I got by downloading the
>>> jar
>>> file.
>> OK. What is the problem with the macro, can you post an example that
>> does not work?
>> Cheers,
>> G.
>