-3

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();
Lune3414
  • 144
  • 1
  • 9
  • 1
    where is the code , here !! – Bourbia Brahim Sep 15 '16 at 11:45
  • When executing the following code the string parameter "Level Sets" in line 3 is not identified as a command. Can you kindly help? 1. ImagePlus imp = new ImagePlus("image_plus", img); 2. imp.setRoi(new OvalRoi(54,51,11,7)); 3. 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"); 4. img = imp.getBufferedImage(); – Feminna Sheeba Sep 19 '16 at 07:37

1 Answers1

0

Manage your project dependencies using Maven. Add a dependency on the sc.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.

ctrueden
  • 6,751
  • 3
  • 37
  • 69