Problem running ShapeLogic on a Mac

Why won't ShapeLogic run as a plug-in for ImageJ?

The problem is that there are several jar files that are needed for it to run. This is described on the Getting started page.


Why won't ShapeLogic run as a plug-in for ImageJ on my Mac?

The problem is that up to version 1.2 Shapelogic has been built to require Java 1.6 and the Mac comes pre installed with Java 1.5. ShapeLogic 1.2.1 is built for JDK 1.5 and should work with the Mac.

If you want to use one of the other version this might work: You can get an update to Java 1.6 for OS X 10.5. See

Then you need to set ImageJ to use Java 1.6. This is done in the ImageJ.cfg file under ImageJ dir.


What version of Java JDK does ShapeLogic work with?

ShapeLogic is compiled with JDK version 1.6. There are parts of it that is using the JSR 223 scripting framework, introduced in 1.6. It might be possible to compiled it with JDK 1.5.


How do I install a snapshot version of ShapeLogic?

  • Download the jar file.
  • Go to ./ImageJ/plugins/shapelogic.
  • Append the word old to the current version e.g.: shapelogic__-0.7.jar.old
  • Copy the downloaded or compiled version to ./ImageJ/plugins/shapelogic
  • [top]


    What tools do I need to build ShapeLogic?

    ShapeLogic is built using Maven 2.

    This makes several build tasks very easy, so this is the recommended way doing builds, but the code should run fine without Maven.

    Currently the project is set up to work directly with Eclipse 3.3, NetBeans 6.0 / 6.1, Java 1.6, but you can use: IntelliJ, JBuilder, emacs or vi.


    How do you build with Maven 2?

    In order to do the following:

    1. runs the unit tests locally
    2. runs the unit tests locally, and if they passes it will create the jar file
    3. runs the unit tests locally and install ShapeLogic to local repository
    Call these commands.
              mvn test
              mvn package
              mvn install


    How is this project site created?

    The ShapeLogic site is created using an Almost Plain Text format. The apt files are stored in the directory: shapelogic/src/site.

    Changes can be tracked in SVN

    For more details look here: Writing documentation

    To generate the site run the following command.

              mvn site



    Are all the libraries dependencies really needed?

    Some of the libraries are only used for in tests. Most importantly Hibernate, which have a lot of dependencies on its own. Given that the current database interactions are very light this could easily be done by JDBC or if rules are stored in flat files or Java classes, that is not needed either.


    Can I take dependent libraries out if its functionality is not used?

    Yes just take them out one at a time until something break.



    Problems closing images when running under ImageJ 1.41, Linux and AMD64
    This does not just affect ShapeLogic plugin, but also build in plugins.

  • Save to a dummy image
  • Start ImageJ 1.41 from a terminal then you can just kill it
  • [top]

    Does ShapeLogic work with other plug-ins for ImageJ?

  • ShapeLogic should work with other plug-ins.
  • ShapeLogic uses off the shelf open source libraries when possible.
  • ShapeLogic is a very lightweight framework.
  • [top]

    Does ShapeLogic work without ImageJ?

    It does for declarative programming. See Project Euler.

    Starting with version 1.1 ShapeLogic's image processing algorithms will be decoupled from ImageJ. The idea is not to redo ImageJ's functionality but to make ShapeLogic more modular. All of ShapeLogic's current image processing algorithms only use very simple image properties so they should apply outside of ImageJ.

    Not everything will work outside ImageJ. The letter match example has a first step that is a skeletonize algorithm that comes with ImageJ. In order to get that to work outside you will need to have another implementation of this.


    When should I use ShapeLogic with ImageJ?

    ImageJ is a fantastic tool for image processing. Here are a few of its features:

  • A great GUI to experiment and work in
  • Lots of free plugins
  • Macro language to combine commands
  • Active user and developer community
  • Responsive mailing list
  • Very easy to program
  • It is free
  • The code is available and in the public domain
  • [top]

    When should I use ShapeLogic without ImageJ?

  • If you want to embed ShapeLogic in your application without adding ImageJ
  • Sometimes it is hard to separate ImageJ from the ImageJ GUI
  • You need to use some other library say Java2D or JAI
  • [top]

    Could ShapeLogic be used as a general declarative programming framework?

    One of the main objectives for ShapeLogic is to make a good hybrid of Declarative programming and Object Oriented programming. This is not specific to image processing or computer vision. Since ShapeLogic 0.9 the lazy stream logic framework was implemented, so from then on it was possible that ShapeLogic would be applicable to other domains. This is not a priority for the current development effort.

    There are many approaches to declarative, object oriented hybrids. Here is a short list of of some of them:

  • JavaFX the new Java RIA.
  • Prova is a Java Prolog hybrid.
  • List Comprehension in Python and Haskell.
  • Microsoft LINQ
  • Hibernate and ORM tools
  • Drools: An open source RETE engine for the Java JVM.
  • OWL: Web Ontology Language.
  • [top]