Login  Register

Re: NoSuchFieldError between BlockMatching and TrakEM2

Posted by Eva_Fiorinelli on Jul 16, 2015; 2:21pm
URL: http://imagej.273.s1.nabble.com/NoSuchFieldError-between-BlockMatching-and-TrakEM2-tp5013555p5013600.html

Hi all,

Despite my Fiji seems to be fully up to date, the last version of TrakEM2_ that I can see in the Fiji updater is TrakEM2_-1.0b-SNAPSHOT from Archipelago and it was released April 9th 2014.

As you said Curtis, I mavenized my Eclipse project, I used pom-fiji 12.1.0 as parent in my POM.xml and ij 1.49v as dependency. I use the repository http://maven.imagej.net/content/groups/public.
I added the plugins Volume_Viewer, blockmatching and TrakEM2 as dependencies in the POM file (compile scope).

It seems to work well, for example I can build a Volume Viewer object in my code. My problem is that I want to not display the windows so I would like to call these plugins in a macro with batch mode :

setBatchMode(true);
options = getArgument;

run("Extract Block Matching Correspondences", options+" layer_scale=1 search_radius=50 block_radius=50 resolution=24 minimal_pmcc_r=0.10 maximal_curvature_ratio=1000 maximal_second_best_r/best_r=1 use_local_smoothness_filter approximate_local_transformation=Affine local_region_sigma=65 maximal_local_displacement=12 maximal_local_displacement=3 export");

setBatchMode(false);

To execute this macro with runMacroFile in the project, I placed it in the src/main/resources directory of Maven. I obtain this error :

Unrecognized command: "Volume Viewer"
Unrecognized command: "Extract Block Matching Correspondences"

I have the same error with IJ.run(imp, "Volume Viewer", ""); directly in my Java class.

I don't know if Maven doesn't read plugins.config files or it comes from my Eclipse configuration.

[EDIT]

I found these discussions here and here, I'm trying to define -Dplugins.dir correctly.

-Dplugins.dir=C:\Users\fiorinelli\.m2\repository\sc\fiji\Volume_Viewer\2.01.1

is able to find the plugin but

-Dij1.plugin.dirs=C:\Users\fiorinelli\.m2\repository\sc\fiji\Volume_Viewer\2.01.1;C:\Users\fiorinelli\.m2\repository\sc\fiji\TrakEM2_\1.0f;C:\Users\fiorinelli\.m2\repository\sc\fiji\mpicbg-trakem2\1.2.2;C:\Users\fiorinelli\.m2\repository\sc\fiji\blockmatching_\2.1.1

doesn't find anything.

My temporary solution is to copy the jars I need from .m2\repository\... folder to the same folder and define -Dplugins.dir=<this directory>

[/EDIT]

Thank you very much for your help,

Eva