简体   繁体   中英

Java with ImageJ

I am using ImageJ in java code for doing segmentation of objects in images using LevelSet.

I imported the jar file called "levelsets.ij.LevelSet". But I get an error as 'unidentified command' in the string field 'Level Sets' in the run command.

Can someone help me to identify the error in my program?

When executing the following code the string parameter "Level Sets" in line 3 is not identified as a command. Can you kindly help?

ImagePlus imp = new ImagePlus("image_plus", img);
imp.setRoi(new   OvalRoi(54,51,11,7)); 

IJ.run(imp,"Level Sets",   "method=[Active Contours] use_level_sets
grey_value_threshold=50 distance_threshold=0.50 advection=2.20
propagation=1 curvature=1 grayscale=20 convergence=0.0050 
region=outside"); 

img = imp.getBufferedImage();

Manage your project dependencies using Maven . Add a dependency on thesc.fiji:level_sets artifact.

I identified this artifact by pressing L to bring up the Command Finder , typing in "level" and then looking at the File column to see which JAR file the levelsets.ij.LevelSet class came from.

See also the Development page of the ImageJ wiki.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM