Login  Register

Re: Odd bUnwarpJ behavior -- help!

Posted by billo on Apr 16, 2017; 9:38pm
URL: http://imagej.273.s1.nabble.com/Odd-bUnwarpJ-behavior-help-tp5018552p5018555.html


Here's a little bit more info. I took out everything from the macro except reading the files and running bUnwarpJ. The problem persists.

First, here's the linux bash script that invokes ImageJ:

% cat jnk.sh

#!/bin/sh
command='./jre/bin/java -Xmx2048m -jar ij.jar -macro billo1.txt "/home/oliver/micros/baby_micros/orig/DSC_2261.JPG /home/oliver/micros/baby_micros/orig/DSC_22
63.JPG"'
eval $command


Here's the modified macro in its entirety:



%cat billo1.txt

position=indexOf(tmpfiles," ");
firstfile=substring(tmpfiles,0,position);
endpos=lengthOf(tmpfiles);
secondfile=substring(tmpfiles,position+1,endpos);
open(firstfile);
open(secondfile);

run("bUnwarpJ", "source_image=firstfile target_image=secondfile registration=Mono image_subsample_factor=0 initial_deformation=[Very Coarse] final_deformation
=Coarse divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01 save_transformations");
close();
run("Quit");


Running this results in the writing of a file named "'get_image=secondfile'" that has the information that should be in firstfile_direct_transf.txt.


billo




On Sat, 2017-04-15 at 08:16 -0700, Ignacio Arganda-Carreras-2 [via ImageJ] wrote:
Hello Billo,

It looks like your path to "blueimage_direct_trans.txt" is not complete.
Have you tried using the whole path to the file?

On Sat, Apr 15, 2017 at 2:56 AM, billo <[hidden email]> wrote:

> I am trying to use bUnwarpJ from a macro in ImageJ (not Fiji) on a linux
> box
> running Fedora 25.
>
> My commands inthe macro are:
>
> run("bUnwarpJ", "source_image=blueimage target_image=greenimage
> registration=Mono image_subsample_factor=0 initial_deformation=[Very
> Coarse]
> final_deformation=Coarse divergence_weight=0 curl_weight=0
> landmark_weight=0
> image_weight=1 consistency_weight=10 stop_threshold=0.01
> save_transformations");
> selectImage("Registered Source Image");
> close();
>
> call("bunwarpj.bUnwarpJ_.elasticTransformImageMacro", "/tmp/green.jpg",
> "/tmp/blue.jpg", "blueimage_direct_transf.txt", "/tmp/bluegreen.tif");
>
> I get the error that "blueimage_direct_trans.txt" does not exist.
>
> When I look for it, I note that the data is there, but it's in a file named
> "get_image=greenimage"!
>
> Any help would be appreciated.
>
> thanks,
>
> billo
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Odd-bUnwarpJ-behavior-help-tp5018552.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.
Ikerbasque Research Fellow
Departamento de Ciencia de la Computacion e Inteligencia Artificial
Facultad de Informatica, Universidad del Pais Vasco
Paseo de Manuel Lardizabal, 1
20018 Donostia-San Sebastian
Guipuzcoa, Spain

Phone : +34 943 01 73 25
Website: http://sites.google.com/site/iargandacarreras/
<http://biocomp.cnb.csic.es/~iarganda/index_EN.html>

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Odd-bUnwarpJ-behavior-help-tp5018552p5018553.html
To unsubscribe from Odd bUnwarpJ behavior -- help!, click here.
NAML