bUnwarpJ: problem saving transformations from macro

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

bUnwarpJ: problem saving transformations from macro

Tim Grocott
Hi there,

I wonder if someone can help. I am attempting to write an ImageJ macro which will generate an elastic transformation .txt file by running bUnwarpJ on two images.

I am running an updated Fiji distribution on OS X 10.7.4.

The problem I have encountered is that no transformation .txt file is saved when running bUnwarpJ from a macro. This can be reproduced as follows:

- Open two images to be registered, e.g. "moving.tif" and "fixed.tif".

- Click "Plugins > Macros > Record..."

- Click "Plugins > Registration > bUnwarpJ"

- In the dialog select the following options:
      Source image = "moving.tif",
      Target image "fixed.tif",
      Registration mode = mono,
      Save transformations = true

- Click OK to run bUnwarpJ

- In the "Save_direct_transformation" dialog choose a location for the transformation .txt file, e.g. the Desktop.

- The transformation .txt file is saved, in this case to the Desktop as "moving_direct_transf.txt". So far so good.

- Delete "moving_direct_transf.txt" from the desktop as we want to see if a macro can generate this file.

- In the Recorder window, click Create to generate a macro for the recorded operation. This loads the macro editor with a single line of code as follows:

run("bUnwarpJ", "source_image=moving.tif target_image=fixed.tif registration=Mono image_subsample_factor=0 initial_deformation=[Very Coarse] final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01 save_transformations save_direct_transformation=/Volumes/Data/timothygrocott/Desktop/moving_direct_transf.txt");

- Click Run in the macro editor and check to see whether the file "moving_direct_transf.txt" is saved on the Desktop. In my case no such file is generated.

Is this a known bug? Is there an alternative method for generating a transformation .txt file? I would be very grateful for any comments or suggestions.

Many thanks in advance,
Tim Grocott
Reply | Threaded
Open this post in threaded view
|

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Hello Tim,

Have you updated Fiji recently? I thought that issue was fixed already. If
not, the transformation files are probably stored in your Fiji folder.

ignacio

On Fri, Jun 8, 2012 at 7:38 AM, Tim Grocott <[hidden email]> wrote:

> Hi there,
>
> I wonder if someone can help. I am attempting to write an ImageJ macro
> which
> will generate an elastic transformation .txt file by running bUnwarpJ on
> two
> images.
>
> I am running an updated Fiji distribution on OS X 10.7.4.
>
> The problem I have encountered is that no transformation .txt file is saved
> when running bUnwarpJ from a macro. This can be reproduced as follows:
>
> - Open two images to be registered, e.g. "moving.tif" and "fixed.tif".
>
> - Click "Plugins > Macros > Record..."
>
> - Click "Plugins > Registration > bUnwarpJ"
>
> - In the dialog select the following options:
>      Source image = "moving.tif",
>      Target image "fixed.tif",
>      Registration mode = mono,
>      Save transformations = true
>
> - Click OK to run bUnwarpJ
>
> - In the "Save_direct_transformation" dialog choose a location for the
> transformation .txt file, e.g. the Desktop.
>
> - The transformation .txt file is saved, in this case to the Desktop as
> "moving_direct_transf.txt". So far so good.
>
> - Delete "moving_direct_transf.txt" from the desktop as we want to see if a
> macro can generate this file.
>
> - In the Recorder window, click Create to generate a macro for the recorded
> operation. This loads the macro editor with a single line of code as
> follows:
>
> *run("bUnwarpJ", "source_image=moving.tif target_image=fixed.tif
> registration=Mono image_subsample_factor=0 initial_deformation=[Very
> Coarse]
> final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0
> image_weight=1 consistency_weight=10 stop_threshold=0.01
> save_transformations
>
> save_direct_transformation=/Volumes/Data/timothygrocott/Desktop/moving_direct_transf.txt");*
>
> - Click Run in the macro editor and check to see whether the file
> "moving_direct_transf.txt" is saved on the Desktop. In my case no such file
> is generated.
>
> Is this a known bug? Is there an alternative method for generating a
> transformation .txt file? I would be very grateful for any comments or
> suggestions.
>
> Many thanks in advance,
> Tim Grocott
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Tim Grocott
Hi Ignacio,

Thank you very much for your reply, I really appreciate your help!

I can confirm that Fiji is fully up to date (at least that is what the Fiji updater tells me). I also checked the ImageJ version from the help menu and that says 1.46j (although on loading FIJI the status bar says 1.46p).

As I am using a Mac, FIJI is contained within a package in the applications folder. I checked to see if any .txt files were generated within this package but none were.  I also did a system-wide search which failed to find any .txt file with the appropriate name.

To check if this is a Mac-specific problem I also tried to do this same test on a Windows Vista machine. Unfortunately that particular version of FIJI is not up to date as I do not have admin access for that machine, (ImageJ version is 1.45r). The test fails on the Windows machine (i.e. bUnwarpJ generates the .txt file without incident when run from the plugins menu, but fails when run from the macro) and this time FIJI gives an error message:

IOException exceptionjava.io.FileNotFoundException: moving_direct_transf.txt (Access is denied)

Perhaps it is trying to save the .txt file to the FIJI folder as you suggest but failing to do so? On the Windows machine this may be because my user account does not have write access for C:\Program Files\. I will try again on my old Windows XP laptop but ideally I would like to specify a different target folder.

I would be very grateful for any other suggestions.

Many thanks again,
Tim

Ignacio Arganda-Carreras wrote
Hello Tim,

Have you updated Fiji recently? I thought that issue was fixed already. If
not, the transformation files are probably stored in your Fiji folder.

ignacio

On Fri, Jun 8, 2012 at 7:38 AM, Tim Grocott <[hidden email]> wrote:

> Hi there,
>
> I wonder if someone can help. I am attempting to write an ImageJ macro
> which
> will generate an elastic transformation .txt file by running bUnwarpJ on
> two
> images.
>
> I am running an updated Fiji distribution on OS X 10.7.4.
>
> The problem I have encountered is that no transformation .txt file is saved
> when running bUnwarpJ from a macro. This can be reproduced as follows:
>
> - Open two images to be registered, e.g. "moving.tif" and "fixed.tif".
>
> - Click "Plugins > Macros > Record..."
>
> - Click "Plugins > Registration > bUnwarpJ"
>
> - In the dialog select the following options:
>      Source image = "moving.tif",
>      Target image "fixed.tif",
>      Registration mode = mono,
>      Save transformations = true
>
> - Click OK to run bUnwarpJ
>
> - In the "Save_direct_transformation" dialog choose a location for the
> transformation .txt file, e.g. the Desktop.
>
> - The transformation .txt file is saved, in this case to the Desktop as
> "moving_direct_transf.txt". So far so good.
>
> - Delete "moving_direct_transf.txt" from the desktop as we want to see if a
> macro can generate this file.
>
> - In the Recorder window, click Create to generate a macro for the recorded
> operation. This loads the macro editor with a single line of code as
> follows:
>
> *run("bUnwarpJ", "source_image=moving.tif target_image=fixed.tif
> registration=Mono image_subsample_factor=0 initial_deformation=[Very
> Coarse]
> final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0
> image_weight=1 consistency_weight=10 stop_threshold=0.01
> save_transformations
>
> save_direct_transformation=/Volumes/Data/timothygrocott/Desktop/moving_direct_transf.txt");*
>
> - Click Run in the macro editor and check to see whether the file
> "moving_direct_transf.txt" is saved on the Desktop. In my case no such file
> is generated.
>
> Is this a known bug? Is there an alternative method for generating a
> transformation .txt file? I would be very grateful for any comments or
> suggestions.
>
> Many thanks in advance,
> Tim Grocott
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Tim Grocott
Just a quick update,

I downloaded and re-installed FIJI on the Mac (fiji-macosx-20110307.dmg) and tried the test before updating (ImageJ version = 1.45b). In this case the macro generates a .txt file inside the FIJI package within the Applications folder. However, after updating FIJI (ImageJ version = 1.46j [=1.46p in status bar]) no .txt file is generated at any location (neither inside the FIJI package, nor at the intended location or anywhere else). Hopefully this can help to track down the problem.

Many thanks and kind regards,
Tim

Tim Grocott wrote
Hi Ignacio,

Thank you very much for your reply, I really appreciate your help!

I can confirm that Fiji is fully up to date (at least that is what the Fiji updater tells me). I also checked the ImageJ version from the help menu and that says 1.46j (although on loading FIJI the status bar says 1.46p).

As I am using a Mac, FIJI is contained within a package in the applications folder. I checked to see if any .txt files were generated within this package but none were.  I also did a system-wide search which failed to find any .txt file with the appropriate name.

To check if this is a Mac-specific problem I also tried to do this same test on a Windows Vista machine. Unfortunately that particular version of FIJI is not up to date as I do not have admin access for that machine, (ImageJ version is 1.45r). The test fails on the Windows machine (i.e. bUnwarpJ generates the .txt file without incident when run from the plugins menu, but fails when run from the macro) and this time FIJI gives an error message:

IOException exceptionjava.io.FileNotFoundException: moving_direct_transf.txt (Access is denied)

Perhaps it is trying to save the .txt file to the FIJI folder as you suggest but failing to do so? On the Windows machine this may be because my user account does not have write access for C:\Program Files\. I will try again on my old Windows XP laptop but ideally I would like to specify a different target folder.

I would be very grateful for any other suggestions.

Many thanks again,
Tim

Ignacio Arganda-Carreras wrote
Hello Tim,

Have you updated Fiji recently? I thought that issue was fixed already. If
not, the transformation files are probably stored in your Fiji folder.

ignacio

On Fri, Jun 8, 2012 at 7:38 AM, Tim Grocott <[hidden email]> wrote:

> Hi there,
>
> I wonder if someone can help. I am attempting to write an ImageJ macro
> which
> will generate an elastic transformation .txt file by running bUnwarpJ on
> two
> images.
>
> I am running an updated Fiji distribution on OS X 10.7.4.
>
> The problem I have encountered is that no transformation .txt file is saved
> when running bUnwarpJ from a macro. This can be reproduced as follows:
>
> - Open two images to be registered, e.g. "moving.tif" and "fixed.tif".
>
> - Click "Plugins > Macros > Record..."
>
> - Click "Plugins > Registration > bUnwarpJ"
>
> - In the dialog select the following options:
>      Source image = "moving.tif",
>      Target image "fixed.tif",
>      Registration mode = mono,
>      Save transformations = true
>
> - Click OK to run bUnwarpJ
>
> - In the "Save_direct_transformation" dialog choose a location for the
> transformation .txt file, e.g. the Desktop.
>
> - The transformation .txt file is saved, in this case to the Desktop as
> "moving_direct_transf.txt". So far so good.
>
> - Delete "moving_direct_transf.txt" from the desktop as we want to see if a
> macro can generate this file.
>
> - In the Recorder window, click Create to generate a macro for the recorded
> operation. This loads the macro editor with a single line of code as
> follows:
>
> *run("bUnwarpJ", "source_image=moving.tif target_image=fixed.tif
> registration=Mono image_subsample_factor=0 initial_deformation=[Very
> Coarse]
> final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0
> image_weight=1 consistency_weight=10 stop_threshold=0.01
> save_transformations
>
> save_direct_transformation=/Volumes/Data/timothygrocott/Desktop/moving_direct_transf.txt");*
>
> - Click Run in the macro editor and check to see whether the file
> "moving_direct_transf.txt" is saved on the Desktop. In my case no such file
> is generated.
>
> Is this a known bug? Is there an alternative method for generating a
> transformation .txt file? I would be very grateful for any comments or
> suggestions.
>
> Many thanks in advance,
> Tim Grocott
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Hello Tim,

This is very strange, I tried myself on a Mac and it works for me (the
files are saved in the Desktop). My status bar says Fiji/ImageJ 1.46p as
well.

Oh, and it works as well in my Linux machine...

If you want i can send you the JAR file so you can compare with the one you
have.

ignacio

On Mon, Jun 11, 2012 at 10:57 AM, Tim Grocott <[hidden email]> wrote:

> Just a quick update,
>
> I downloaded and re-installed FIJI on the Mac (fiji-macosx-20110307.dmg)
> and
> tried the test before updating (ImageJ version = 1.45b). In this case the
> macro generates a .txt file inside the FIJI package within the Applications
> folder. However, after updating FIJI (ImageJ version = 1.46j [=1.46p in
> status bar]) no .txt file is generated at any location (neither inside the
> FIJI package, nor at the intended location or anywhere else). Hopefully
> this
> can help to track down the problem.
>
> Many thanks and kind regards,
> Tim
>
>
> Tim Grocott wrote
> >
> > Hi Ignacio,
> >
> > Thank you very much for your reply, I really appreciate your help!
> >
> > I can confirm that Fiji is fully up to date (at least that is what the
> > Fiji updater tells me). I also checked the ImageJ version from the help
> > menu and that says 1.46j (although on loading FIJI the status bar says
> > 1.46p).
> >
> > As I am using a Mac, FIJI is contained within a package in the
> > applications folder. I checked to see if any .txt files were generated
> > within this package but none were.  I also did a system-wide search which
> > failed to find any .txt file with the appropriate name.
> >
> > To check if this is a Mac-specific problem I also tried to do this same
> > test on a Windows Vista machine. Unfortunately that particular version of
> > FIJI is not up to date as I do not have admin access for that machine,
> > (ImageJ version is 1.45r). The test fails on the Windows machine (i.e.
> > bUnwarpJ generates the .txt file without incident when run from the
> > plugins menu, but fails when run from the macro) and this time FIJI gives
> > an error message:
> >
> > *IOException exceptionjava.io.FileNotFoundException:
> > moving_direct_transf.txt (Access is denied)*
> >
> > Perhaps it is trying to save the .txt file to the FIJI folder as you
> > suggest but failing to do so? On the Windows machine this may be because
> > my user account does not have write access for C:\Program Files\. I will
> > try again on my old Windows XP laptop but ideally I would like to specify
> > a different target folder.
> >
> > I would be very grateful for any other suggestions.
> >
> > Many thanks again,
> > Tim
> >
> >
> > Ignacio Arganda-Carreras wrote
> >>
> >> Hello Tim,
> >>
> >> Have you updated Fiji recently? I thought that issue was fixed already.
> >> If
> >> not, the transformation files are probably stored in your Fiji folder.
> >>
> >> ignacio
> >>
> >> On Fri, Jun 8, 2012 at 7:38 AM, Tim Grocott &lt;t.grocott@.ac&gt;
> wrote:
> >>
> >>> Hi there,
> >>>
> >>> I wonder if someone can help. I am attempting to write an ImageJ macro
> >>> which
> >>> will generate an elastic transformation .txt file by running bUnwarpJ
> on
> >>> two
> >>> images.
> >>>
> >>> I am running an updated Fiji distribution on OS X 10.7.4.
> >>>
> >>> The problem I have encountered is that no transformation .txt file is
> >>> saved
> >>> when running bUnwarpJ from a macro. This can be reproduced as follows:
> >>>
> >>> - Open two images to be registered, e.g. "moving.tif" and "fixed.tif".
> >>>
> >>> - Click "Plugins > Macros > Record..."
> >>>
> >>> - Click "Plugins > Registration > bUnwarpJ"
> >>>
> >>> - In the dialog select the following options:
> >>>      Source image = "moving.tif",
> >>>      Target image "fixed.tif",
> >>>      Registration mode = mono,
> >>>      Save transformations = true
> >>>
> >>> - Click OK to run bUnwarpJ
> >>>
> >>> - In the "Save_direct_transformation" dialog choose a location for the
> >>> transformation .txt file, e.g. the Desktop.
> >>>
> >>> - The transformation .txt file is saved, in this case to the Desktop as
> >>> "moving_direct_transf.txt". So far so good.
> >>>
> >>> - Delete "moving_direct_transf.txt" from the desktop as we want to see
> >>> if a
> >>> macro can generate this file.
> >>>
> >>> - In the Recorder window, click Create to generate a macro for the
> >>> recorded
> >>> operation. This loads the macro editor with a single line of code as
> >>> follows:
> >>>
> >>> *run("bUnwarpJ", "source_image=moving.tif target_image=fixed.tif
> >>> registration=Mono image_subsample_factor=0 initial_deformation=[Very
> >>> Coarse]
> >>> final_deformation=Fine divergence_weight=0 curl_weight=0
> >>> landmark_weight=0
> >>> image_weight=1 consistency_weight=10 stop_threshold=0.01
> >>> save_transformations
> >>>
> >>>
> save_direct_transformation=/Volumes/Data/timothygrocott/Desktop/moving_direct_transf.txt");*
> >>>
> >>> - Click Run in the macro editor and check to see whether the file
> >>> "moving_direct_transf.txt" is saved on the Desktop. In my case no such
> >>> file
> >>> is generated.
> >>>
> >>> Is this a known bug? Is there an alternative method for generating a
> >>> transformation .txt file? I would be very grateful for any comments or
> >>> suggestions.
> >>>
> >>> Many thanks in advance,
> >>> Tim Grocott
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948.html
> >>> Sent from the ImageJ mailing list archive at Nabble.com.
> >>>
> >>> --
> >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>>
> >>
> >>
> >>
> >> --
> >> Ignacio Arganda-Carreras, Ph.D.
> >> Seung's lab, 46-5065
> >> Department of Brain and Cognitive Sciences
> >> Massachusetts Institute of Technology
> >> 43 Vassar St.
> >> Cambridge, MA 02139
> >> USA
> >>
> >> Phone: (001) 617-324-3747
> >> Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948p4998980.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Tim Grocott
Hi Ignacio,

Thanks for your reply. I think you are right and it has something to do with the .jar file version.

On further examination, performing the test under v1.46p does indeed generate a file in the Fiji package, but this is a .tif file called "get_image=fixed.tif" and not the expected .txt file called "moving_direct_transf.txt". If I change the file extension from .tif to .txt and open in TextEdit it contains the transformation data (i.e. Intervals, X Coeffs, Y Coeffs). So it is saving the transformation inside the Fiji package as "get_image=fixed.tif", and instead of the desktop.

Under v1.46p "bUnwarpJ_.jar" has a file size of 136KB and the release date is 26 Mar 2012 (checked via Fiji Updater>Advanced Mode). I tried replacing this with "bUnwarpJ_.jar" (Size=267KB, Release date=26 Mar 2012) downloaded from [http://biocomp.cnb.uam.es/~iarganda/bUnwarpJ/downloads/bUnwarpJ_.jar] and re-tested. In this case the expected "moving_direct_transf.txt" is generated inside the Fiji package instead of the desktop.

It should be possible to reproduce this strange behaviour by removing "bUnwarpJ_.jar" from the plugins folder an re-installing via the Fiji Updater - this always gives me a 136KB .jar which saves the transformation as "get_image=fixed.tif".

If you could email your .jar for comparison that would be great! My email is t.grocott at uea.ac.uk

Many thanks again!
Tim
Reply | Threaded
Open this post in threaded view
|

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Hello again Tim,


> On further examination, performing the test under v1.46p does indeed
> generate a file in the Fiji package, but this is a .tif file called
> "get_image=fixed.tif" and not the expected .txt file called
> "moving_direct_transf.txt". If I change the file extension from .tif to
> .txt
> and open in TextEdit it contains the transformation data (i.e. Intervals, X
> Coeffs, Y Coeffs). So it is saving the transformation inside the Fiji
> package as "get_image=fixed.tif", and instead of the desktop.
>
>
That is weird, try with the JAR file i send you to your personal e-mail.



> Under v1.46p "bUnwarpJ_.jar" has a file size of 136KB and the release date
> is 26 Mar 2012 (checked via Fiji Updater>Advanced Mode). I tried replacing
> this with "bUnwarpJ_.jar" (Size=267KB, Release date=26 Mar 2012) downloaded
> from [http://biocomp.cnb.uam.es/~iarganda/bUnwarpJ/downloads/bUnwarpJ_.jar
> ]
> and re-tested. In this case the expected "moving_direct_transf.txt" is
> generated inside the Fiji package instead of the desktop.
>

The JAR file under my site was out of date. I just updated it.



>
> It should be possible to reproduce this strange behaviour by removing
> "bUnwarpJ_.jar" from the plugins folder an re-installing via the Fiji
> Updater - this always gives me a 136KB .jar which saves the transformation
> as "get_image=fixed.tif".
>
> If you could email your .jar for comparison that would be great! My email
> is
> t.grocott at uea.ac.uk
>
>
Done!



> Many thanks again!
>

No problem! I hope you will be able to fix this weird is


> Tim
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948p4999001.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

dscho
Hi Ignacio,

On Tue, 12 Jun 2012, Ignacio Arganda-Carreras wrote:

> The JAR file under my site was out of date. I just updated it.

How about linking to

http://jenkins.imagej.net/job/Stable-Fiji/ws/Fiji.app/plugins/bUnwarpJ_.jar

Hmm? As long as Fiji's build is not broken (which is usually the case)
this will always be up-to-date, thanks to our tireless Jenkins...

Ciao,
Dscho

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

Re: bUnwarpJ: problem saving transformations from macro

Tim Grocott
Hi Ignacio and Johannes,

I tried again using both the JAR that Ignacio emailed me (thank you very much!) and the JAR linked to by Johannnes. Both of these generate the strange "get_image=fixed.tif" file inside the Fiji package just like the JAR downloaded by the Fiji Updater. All three JARs are 136KB so I guess they are identical.

I would be interested to know if anyone else can reproduce this strange behaviour (i.e. "_direct_transf.txt" file disguised as ("get_image=" + name of target image) in the Fiji package/folder) or if it's unique to my system. Just for the record, here is some more info about my system:

-Late 2011 MacBook Pro
-Mac OS X 10.7.4
-Java Virtual Machine: 1.6.0.jdk (javafx-sdk2.1.0-beta also installed)
-Fiji is installed from "fiji-macosx-20110307.dmg" into Applications folder on startup disk then updated via Fiji Updater
-ImageJ version is 1.46p (according to status bar), 1.46j (according to Help>About ImageJ)
-User home folder (including Desktop and all data) is on a separate HDD installed in OptiBay (replaces optical drive)

I will try reproducing this behaviour on my old Windows XP laptop tonight. In the meantime I will continue using the old JAR (276KB) as that at least saves a .txt file allowing me to continue with my project.

Many thanks to Johannes and especially Ignacio for taking the time to help me - it is very much appreciated!

Best wishes,
Tim

Johannes Schindelin wrote
Hi Ignacio,

On Tue, 12 Jun 2012, Ignacio Arganda-Carreras wrote:

> The JAR file under my site was out of date. I just updated it.

How about linking to

http://jenkins.imagej.net/job/Stable-Fiji/ws/Fiji.app/plugins/bUnwarpJ_.jar

Hmm? As long as Fiji's build is not broken (which is usually the case)
this will always be up-to-date, thanks to our tireless Jenkins...

Ciao,
Dscho

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

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Thanks a lot, Johannes! I already updated the links.

Tim, can you send the exact images and macro you're trying to use?

ignacio

On Wed, Jun 13, 2012 at 6:18 AM, Tim Grocott <[hidden email]> wrote:

> Hi Ignacio and Johannes,
>
> I tried again using both the JAR that Ignacio emailed me (thank you very
> much!) and the JAR linked to by Johannnes. Both of these generate the
> strange "get_image=fixed.tif" file inside the Fiji package just like the
> JAR
> downloaded by the Fiji Updater. All three JARs are 136KB so I guess they
> are
> identical.
>
> I would be interested to know if anyone else can reproduce this strange
> behaviour (i.e. "_direct_transf.txt" file disguised as ("get_image=" + name
> of target image) in the Fiji package/folder) or if it's unique to my
> system.
> Just for the record, here is some more info about my system:
>
> -Late 2011 MacBook Pro
> -Mac OS X 10.7.4
> -Java Virtual Machine: 1.6.0.jdk (javafx-sdk2.1.0-beta also installed)
> -Fiji is installed from "fiji-macosx-20110307.dmg" into Applications folder
> on startup disk then updated via Fiji Updater
> -ImageJ version is 1.46p (according to status bar), 1.46j (according to
> Help>About ImageJ)
> -User home folder (including Desktop and all data) is on a separate HDD
> installed in OptiBay (replaces optical drive)
>
> I will try reproducing this behaviour on my old Windows XP laptop tonight.
> In the meantime I will continue using the old JAR (276KB) as that at least
> saves a .txt file allowing me to continue with my project.
>
> Many thanks to Johannes and especially Ignacio for taking the time to help
> me - it is very much appreciated!
>
> Best wishes,
> Tim
>
>
> Johannes Schindelin wrote
> >
> > Hi Ignacio,
> >
> > On Tue, 12 Jun 2012, Ignacio Arganda-Carreras wrote:
> >
> >> The JAR file under my site was out of date. I just updated it.
> >
> > How about linking to
> >
> >
> http://jenkins.imagej.net/job/Stable-Fiji/ws/Fiji.app/plugins/bUnwarpJ_.jar
> >
> > Hmm? As long as Fiji's build is not broken (which is usually the case)
> > this will always be up-to-date, thanks to our tireless Jenkins...
> >
> > Ciao,
> > Dscho
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948p4999039.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Dear all,

I finally found the bug and fixed it. The problem was I was mixing up the
direct and inverse transformations when saving them into files. That way,
when using the "Accurate" or "Fast" modes, the files were saved with
incorrect names, and when using the "Mono" mode, no file was correctly
saved.

Thanks Tim for reporting! You should be able to update Fiji now and use it
as expected!

Cheers!

ignacio

On Wed, Jun 13, 2012 at 3:44 PM, Ignacio Arganda-Carreras <
[hidden email]> wrote:

> Thanks a lot, Johannes! I already updated the links.
>
> Tim, can you send the exact images and macro you're trying to use?
>
> ignacio
>
>
> On Wed, Jun 13, 2012 at 6:18 AM, Tim Grocott <[hidden email]> wrote:
>
>> Hi Ignacio and Johannes,
>>
>> I tried again using both the JAR that Ignacio emailed me (thank you very
>> much!) and the JAR linked to by Johannnes. Both of these generate the
>> strange "get_image=fixed.tif" file inside the Fiji package just like the
>> JAR
>> downloaded by the Fiji Updater. All three JARs are 136KB so I guess they
>> are
>> identical.
>>
>> I would be interested to know if anyone else can reproduce this strange
>> behaviour (i.e. "_direct_transf.txt" file disguised as ("get_image=" +
>> name
>> of target image) in the Fiji package/folder) or if it's unique to my
>> system.
>> Just for the record, here is some more info about my system:
>>
>> -Late 2011 MacBook Pro
>> -Mac OS X 10.7.4
>> -Java Virtual Machine: 1.6.0.jdk (javafx-sdk2.1.0-beta also installed)
>> -Fiji is installed from "fiji-macosx-20110307.dmg" into Applications
>> folder
>> on startup disk then updated via Fiji Updater
>> -ImageJ version is 1.46p (according to status bar), 1.46j (according to
>> Help>About ImageJ)
>> -User home folder (including Desktop and all data) is on a separate HDD
>> installed in OptiBay (replaces optical drive)
>>
>> I will try reproducing this behaviour on my old Windows XP laptop tonight.
>> In the meantime I will continue using the old JAR (276KB) as that at least
>> saves a .txt file allowing me to continue with my project.
>>
>> Many thanks to Johannes and especially Ignacio for taking the time to help
>> me - it is very much appreciated!
>>
>> Best wishes,
>> Tim
>>
>>
>> Johannes Schindelin wrote
>> >
>> > Hi Ignacio,
>> >
>> > On Tue, 12 Jun 2012, Ignacio Arganda-Carreras wrote:
>> >
>> >> The JAR file under my site was out of date. I just updated it.
>> >
>> > How about linking to
>> >
>> >
>> http://jenkins.imagej.net/job/Stable-Fiji/ws/Fiji.app/plugins/bUnwarpJ_.jar
>> >
>> > Hmm? As long as Fiji's build is not broken (which is usually the case)
>> > this will always be up-to-date, thanks to our tireless Jenkins...
>> >
>> > Ciao,
>> > Dscho
>> >
>> > --
>> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>> >
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948p4999039.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>
>
> --
> Ignacio Arganda-Carreras, Ph.D.
> Seung's lab, 46-5065
> Department of Brain and Cognitive Sciences
> Massachusetts Institute of Technology
> 43 Vassar St.
> Cambridge, MA 02139
> USA
>
> Phone: (001) 617-324-3747
> Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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

Re: bUnwarpJ: problem saving transformations from macro

Tim Grocott
Hi Ignacio,

Thanks a lot, those macros I sent work perfectly now!!!

You are probably sick of me by now but I think I should also report two more strange behaviours that I noticed since the update.

1) Saving transformation files to a path which includes spaces generates an error message, for example if you save to a folder called "untitled folder" on the desktop you get the following message:

"IOException exceptionjava.io.FileNotFoundException: [/Volumes/Data/timothygrocott/Desktop/untitled folder/moving_direct_transf.txt] (No such file or directory)"

I think this is because the Macro Recorder encloses file names and paths in square brackets when they include spaces (i.e. [...]), but the plugin is not parsing them out as can be seen from the error message. The brackets are required in the macro as otherwise the file name/path is truncated before the space and the characters after the space are interpreted by run() as a separate flag. There is no problem for file names and paths which do not include spaces (as with the macros I sent) because no brackets are inserted in those cases.

2) If the macro does not specify the file name/path when saving the transformation files (i.e. the "save_transformations" flag is set, but the "save_direct_transformation=" and "save_inverse_transformation=" flags are excluded) then the direct and inverse transformation files are saved to the Fiji folder as expected, but they are unexpectedly named "rget_image=fixed.tif" and "get_image=fixed.tif" (I'm not sure which is which). This may cause problems if someone wants to access the files, for example using call("bunwarpj.bUnwarpJ_.elasticTransformImageMacro", ...) as they will not have the expected file names.

Cheers,
Tim
Reply | Threaded
Open this post in threaded view
|

Re: bUnwarpJ: problem saving transformations from macro

Ignacio Arganda-Carreras
Fixed and fixed! Thanks for reporting, Tim!

Right now, if you leave the path of the files blank, the transformation
will be saved with default names in the current folder.

Cheers!

ignacio

On Mon, Jun 18, 2012 at 6:49 AM, Tim Grocott <[hidden email]> wrote:

> Hi Ignacio,
>
> Thanks a lot, those macros I sent work perfectly now!!!
>
> You are probably sick of me by now but I think I should also report two
> more
> strange behaviours that I noticed since the update.
>
> 1) Saving transformation files to a path which includes spaces generates an
> error message, for example if you save to a folder called "untitled folder"
> on the desktop you get the following message:
>
> "IOException exceptionjava.io.FileNotFoundException:
> [/Volumes/Data/timothygrocott/Desktop/untitled
> folder/moving_direct_transf.txt] (No such file or directory)"
>
> I think this is because the Macro Recorder encloses file names and paths in
> square brackets when they include spaces (i.e. [...]), but the plugin is
> not
> parsing them out as can be seen from the error message. The brackets are
> required in the macro as otherwise the file name/path is truncated before
> the space and the characters after the space are interpreted by run() as a
> separate flag. There is no problem for file names and paths which do not
> include spaces (as with the macros I sent) because no brackets are inserted
> in those cases.
>
> 2) If the macro does not specify the file name/path when saving the
> transformation files (i.e. the "save_transformations" flag is set, but the
> "save_direct_transformation=" and "save_inverse_transformation=" flags are
> excluded) then the direct and inverse transformation files are saved to the
> Fiji folder as expected, but they are unexpectedly named
> "rget_image=fixed.tif" and "get_image=fixed.tif" (I'm not sure which is
> which). This may cause problems if someone wants to access the files, for
> example using call("bunwarpj.bUnwarpJ_.elasticTransformImageMacro", ...) as
> they will not have the expected file names.
>
> Cheers,
> Tim
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/bUnwarpJ-problem-saving-transformations-from-macro-tp4998948p4999106.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

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