Login  Register

Re: Apply bUnwarpJ in macro

Posted by CARL Philippe (LBP) on May 10, 2016; 8:58am
URL: http://imagej.273.s1.nabble.com/Apply-bUnwarpJ-in-macro-tp5016374p5016378.html

Dear Neil and curtis,
If you launch: run("UnwarpJ ", "-help");
Within a macro you will be able to display the help file.
And you can run the macro using a previously generated transformed file with:
run("UnwarpJ ", "-transform target.jpg source.jpg transformation.txt output.tif");
target.jpg, source.jpg, transformation.txt and output.tif being the complete paths of the source pictures, transformation file and output file on the HD.
For the applications of a colleague who needed to apply the plugin to large stacks of images I extended the plugin so it can be applied on pictures loaded on memory through:
run("UnwarpJ ", " -transformMemory target.jpg source.jpg transformation.txt output.tif"); with target.jpg and source.jpg being pictures loaded within the memory, the transformation.txt file being from the HD and the output.tif created as well within the memory.
In the case you are interested by this extended version of the plugin, you will be able to download it under: http://punias.free.fr/Unwarp/ UnwarpJ_.jar
My best regards,
Philippe

Philippe CARL
Laboratoire de Biophotonique et Pharmacologie
UMR 7213 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Curtis Rueden
Envoyé : lundi 9 mai 2016 23:20
À : [hidden email]
Objet : Re: Apply bUnwarpJ in macro

Hi Neil,

> Does anybody know how to apply the transformation created using
> bUnwarpJ.  I saved the transform txt files, both forward and backward,
> but I'm a little lost on how to apply this to other images in a macro.

According to the documentation at
http://imagej.net/BUnwarpJ#Macro_call

    if we want to apply an elastic deformation stored in the file
    A_direct_transf.txt to the source image A.jpg with target image
    B.jpg and save the result in output.tif, we call:

        call( "bunwarpj.bUnwarpJ_.elasticTransformImageMacro",
"My_path/A.jpg",
              "My_path/B.jpg", "My_path/A_direct_transf.txt", "My_path/output.tif" );

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/


On Mon, May 9, 2016 at 3:10 PM, nellypledge <[hidden email]> wrote:

> Hi all,
> Does anybody know how to apply the transformation created using bUnwarpJ.
> I
> saved the transform txt files, both forward and backward, but I'm a
> little lost on how to apply this to other images in a macro.
>
> Thanks in advance for your time.
> Neil
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Apply-bUnwarpJ-in-macro-tp5016374.htm
> l 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