Dear all,
I'm using the block matching plugin of Stephan Saalfeld in Java. When I execute the command : IJ.run(Brain, "Extract Block Matching Correspondences", "source_image=IMG1.dcm target_image=Brain 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 export"); I obtain this error : java.lang.NoSuchFieldError: m00 at mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:76) at mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:22) at mpicbg.models.AbstractModel.filter(AbstractModel.java:181) at mpicbg.models.AbstractModel.filter(AbstractModel.java:239) at mpicbg.models.AbstractModel.localSmoothnessFilter(AbstractModel.java:677) at mpicbg.ij.plugin.BlockMatching_ExtractPoinRoi.run(BlockMatching_ExtractPoinRoi.java:152) at ij.IJ.runUserPlugIn(IJ.java:199) at ij.IJ.runPlugIn(IJ.java:163) at ij.Executer.runCommand(Executer.java:132) at ij.Executer.run(Executer.java:65) at ij.IJ.run(IJ.java:279) at ij.IJ.run(IJ.java:334) at strokeDetection.model.ArterialMatching.match(ArterialMatching.java:110) at strokeDetection.model.ArterialMatching.<init>(ArterialMatching.java:24) at strokeDetection.Main.main(Main.java:25) The documentation says that the NoSuchField error is : Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. So I think I have the bad version for one of the dependencies but I don't find which one. In Fiji/jars there are mpicbg-1.0.1.jar and mpicbg-trakem2-1.2.2. In Fiji/plugins I use TrakEM2_-1.0b-SNAPSHOT.jar and blockmatching_-2.1.1. Does anyone know what versions of blockmatching and TrakEM2 I need ? Thank you, Eva |
Hi Eva,
you can find the most recent snapshots of all involved jar files at the ImageJ maven repository: http://maven.imagej.net/index.html#nexus-search;gav~sc.fiji~TrakEM2_~~~~kw,versionexpand jars/mpicbg-1.0.1 jars/mpicbg-trakem-1.2.2 plugins/blockmatching_2.1.1 plugins/mpicbg_-1.0.1 plugins/TrakEM2_-1.0f should work. I.e. TrakEM2_ is outdated. Cheers, Stephan On Tue, 2015-07-14 at 07:16 -0700, Eva_Fiorinelli wrote: > Dear all, > > I'm using the block matching plugin of Stephan Saalfeld in Java. > When I execute the command : > > IJ.run(Brain, "Extract Block Matching Correspondences", > "source_image=IMG1.dcm target_image=Brain 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 export"); > > I obtain this error : > > java.lang.NoSuchFieldError: m00 > at mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:76) > at mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:22) > at mpicbg.models.AbstractModel.filter(AbstractModel.java:181) > at mpicbg.models.AbstractModel.filter(AbstractModel.java:239) > at > mpicbg.models.AbstractModel.localSmoothnessFilter(AbstractModel.java:677) > at > mpicbg.ij.plugin.BlockMatching_ExtractPoinRoi.run(BlockMatching_ExtractPoinRoi.java:152) > at ij.IJ.runUserPlugIn(IJ.java:199) > at ij.IJ.runPlugIn(IJ.java:163) > at ij.Executer.runCommand(Executer.java:132) > at ij.Executer.run(Executer.java:65) > at ij.IJ.run(IJ.java:279) > at ij.IJ.run(IJ.java:334) > at strokeDetection.model.ArterialMatching.match(ArterialMatching.java:110) > at strokeDetection.model.ArterialMatching.<init>(ArterialMatching.java:24) > at strokeDetection.Main.main(Main.java:25) > > The documentation > <http://docs.oracle.com/javase/7/docs/api/java/lang/NoSuchFieldError.html> > says that the NoSuchField error is : > > Thrown if an application tries to access or modify a specified field of an > object, and that object no longer has that field. > Normally, this error is caught by the compiler; this error can only occur at > run time if the definition of a class has incompatibly changed. > > So I think I have the bad version for one of the dependencies but I don't > find which one. > In Fiji/jars there are mpicbg-1.0.1.jar and mpicbg-trakem2-1.2.2. > In Fiji/plugins I use TrakEM2_-1.0b-SNAPSHOT.jar and blockmatching_-2.1.1. > > Does anyone know what versions of blockmatching and TrakEM2 I need ? > > Thank you, > > Eva > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/NoSuchFieldError-between-BlockMatching-and-TrakEM2-tp5013555.html > 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 |
Hi Eva, Stephan, everyone,
> TrakEM2_ is outdated. In general, it should not be possible to receive NoSuchFieldError or similar "jar skew" problems with a fully up-to-date version of all ImageJ and Fiji components. If that happens, it is a bug. Eva: is your Fiji fully up to date? [1] Stephan: Do new versions of any TrakEM2 components need to be uploaded to the Fiji update site? If so, which? Regards, Curtis [1] http://imagej.net/FAQ#How_can_I_verify_that_my_ImageJ_is_really_100.25_up_to_date.3F On Wed, Jul 15, 2015 at 8:43 AM, Saalfeld, Stephan < [hidden email]> wrote: > Hi Eva, > > you can find the most recent snapshots of all involved jar files at the > ImageJ maven repository: > > > http://maven.imagej.net/index.html#nexus-search;gav~sc.fiji~TrakEM2_~~~~kw,versionexpand > > jars/mpicbg-1.0.1 > jars/mpicbg-trakem-1.2.2 > plugins/blockmatching_2.1.1 > plugins/mpicbg_-1.0.1 > plugins/TrakEM2_-1.0f > > should work. I.e. TrakEM2_ is outdated. > > Cheers, > Stephan > > On Tue, 2015-07-14 at 07:16 -0700, Eva_Fiorinelli wrote: > > Dear all, > > > > I'm using the block matching plugin of Stephan Saalfeld in Java. > > When I execute the command : > > > > IJ.run(Brain, "Extract Block Matching Correspondences", > > "source_image=IMG1.dcm target_image=Brain 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 export"); > > > > I obtain this error : > > > > java.lang.NoSuchFieldError: m00 > > at > mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:76) > > at > mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:22) > > at mpicbg.models.AbstractModel.filter(AbstractModel.java:181) > > at mpicbg.models.AbstractModel.filter(AbstractModel.java:239) > > at > > mpicbg.models.AbstractModel.localSmoothnessFilter(AbstractModel.java:677) > > at > > > mpicbg.ij.plugin.BlockMatching_ExtractPoinRoi.run(BlockMatching_ExtractPoinRoi.java:152) > > at ij.IJ.runUserPlugIn(IJ.java:199) > > at ij.IJ.runPlugIn(IJ.java:163) > > at ij.Executer.runCommand(Executer.java:132) > > at ij.Executer.run(Executer.java:65) > > at ij.IJ.run(IJ.java:279) > > at ij.IJ.run(IJ.java:334) > > at > strokeDetection.model.ArterialMatching.match(ArterialMatching.java:110) > > at > strokeDetection.model.ArterialMatching.<init>(ArterialMatching.java:24) > > at strokeDetection.Main.main(Main.java:25) > > > > The documentation > > < > http://docs.oracle.com/javase/7/docs/api/java/lang/NoSuchFieldError.html> > > says that the NoSuchField error is : > > > > Thrown if an application tries to access or modify a specified field of > an > > object, and that object no longer has that field. > > Normally, this error is caught by the compiler; this error can only > occur at > > run time if the definition of a class has incompatibly changed. > > > > So I think I have the bad version for one of the dependencies but I don't > > find which one. > > In Fiji/jars there are mpicbg-1.0.1.jar and mpicbg-trakem2-1.2.2. > > In Fiji/plugins I use TrakEM2_-1.0b-SNAPSHOT.jar and > blockmatching_-2.1.1. > > > > Does anyone know what versions of blockmatching and TrakEM2 I need ? > > > > Thank you, > > > > Eva > > > > > > > > -- > > View this message in context: > http://imagej.1557.x6.nabble.com/NoSuchFieldError-between-BlockMatching-and-TrakEM2-tp5013555.html > > 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 |
Hi again Eva,
I just noticed you said you are calling the plugin "from Java." > Does anyone know what versions of blockmatching and TrakEM2 I need ? The answer here is to use pom-fiji to manage the Bill of Materials [1], so that you inherit compatible versions. Use Maven [2] (or Maven-compatible tool such as Gradle), and extend or import pom-fiji. Happy to go into more detail if needed; just ask. Regards, Curtis [1] http://imagej.net/BOM [2] http://imagej.net/Maven On Wed, Jul 15, 2015 at 1:26 PM, Curtis Rueden <[hidden email]> wrote: > Hi Eva, Stephan, everyone, > > > TrakEM2_ is outdated. > > In general, it should not be possible to receive NoSuchFieldError or > similar "jar skew" problems with a fully up-to-date version of all ImageJ > and Fiji components. If that happens, it is a bug. > > Eva: is your Fiji fully up to date? [1] > > Stephan: Do new versions of any TrakEM2 components need to be uploaded to > the Fiji update site? If so, which? > > Regards, > Curtis > > [1] > http://imagej.net/FAQ#How_can_I_verify_that_my_ImageJ_is_really_100.25_up_to_date.3F > > On Wed, Jul 15, 2015 at 8:43 AM, Saalfeld, Stephan < > [hidden email]> wrote: > >> Hi Eva, >> >> you can find the most recent snapshots of all involved jar files at the >> ImageJ maven repository: >> >> >> http://maven.imagej.net/index.html#nexus-search;gav~sc.fiji~TrakEM2_~~~~kw,versionexpand >> >> jars/mpicbg-1.0.1 >> jars/mpicbg-trakem-1.2.2 >> plugins/blockmatching_2.1.1 >> plugins/mpicbg_-1.0.1 >> plugins/TrakEM2_-1.0f >> >> should work. I.e. TrakEM2_ is outdated. >> >> Cheers, >> Stephan >> >> On Tue, 2015-07-14 at 07:16 -0700, Eva_Fiorinelli wrote: >> > Dear all, >> > >> > I'm using the block matching plugin of Stephan Saalfeld in Java. >> > When I execute the command : >> > >> > IJ.run(Brain, "Extract Block Matching Correspondences", >> > "source_image=IMG1.dcm target_image=Brain 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 export"); >> > >> > I obtain this error : >> > >> > java.lang.NoSuchFieldError: m00 >> > at >> mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:76) >> > at >> mpicbg.trakem2.transform.AffineModel2D.copy(AffineModel2D.java:22) >> > at mpicbg.models.AbstractModel.filter(AbstractModel.java:181) >> > at mpicbg.models.AbstractModel.filter(AbstractModel.java:239) >> > at >> > >> mpicbg.models.AbstractModel.localSmoothnessFilter(AbstractModel.java:677) >> > at >> > >> mpicbg.ij.plugin.BlockMatching_ExtractPoinRoi.run(BlockMatching_ExtractPoinRoi.java:152) >> > at ij.IJ.runUserPlugIn(IJ.java:199) >> > at ij.IJ.runPlugIn(IJ.java:163) >> > at ij.Executer.runCommand(Executer.java:132) >> > at ij.Executer.run(Executer.java:65) >> > at ij.IJ.run(IJ.java:279) >> > at ij.IJ.run(IJ.java:334) >> > at >> strokeDetection.model.ArterialMatching.match(ArterialMatching.java:110) >> > at >> strokeDetection.model.ArterialMatching.<init>(ArterialMatching.java:24) >> > at strokeDetection.Main.main(Main.java:25) >> > >> > The documentation >> > < >> http://docs.oracle.com/javase/7/docs/api/java/lang/NoSuchFieldError.html> >> > says that the NoSuchField error is : >> > >> > Thrown if an application tries to access or modify a specified field of >> an >> > object, and that object no longer has that field. >> > Normally, this error is caught by the compiler; this error can only >> occur at >> > run time if the definition of a class has incompatibly changed. >> > >> > So I think I have the bad version for one of the dependencies but I >> don't >> > find which one. >> > In Fiji/jars there are mpicbg-1.0.1.jar and mpicbg-trakem2-1.2.2. >> > In Fiji/plugins I use TrakEM2_-1.0b-SNAPSHOT.jar and >> blockmatching_-2.1.1. >> > >> > Does anyone know what versions of blockmatching and TrakEM2 I need ? >> > >> > Thank you, >> > >> > Eva >> > >> > >> > >> > -- >> > View this message in context: >> http://imagej.1557.x6.nabble.com/NoSuchFieldError-between-BlockMatching-and-TrakEM2-tp5013555.html >> > 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 |
This post was updated on .
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 |
Free forum by Nabble | Edit this page |