Code Monkey home page Code Monkey logo

neubias_ts11's Introduction

In this repository, you find step-by-step instructions on how to build up personalized a template for your ImageJ2/Fiji plugins. Furthermore, you learn how to build up a workflow for image segmentation / labelling / measurements. Just go through the git branches to see how code evolves.


This is an example Maven project implementing an ImageJ command.

It is intended as an ideal starting point to develop new ImageJ commands in an IDE of your choice. You can even collaborate with developers using a different IDE than you.

  • In Eclipse, for example, it is as simple as File>Import...>Existing Maven Project.

  • In NetBeans, it is even simpler: File>Open Project.

  • The same works in IntelliJ.

  • If jEdit is your preferred IDE, you will need the Maven Plugin.

Die-hard command-line developers can use Maven directly by calling mvn in the project root.

However you build the project, in the end you will have the .jar file (called artifact in Maven speak) in the target/ subdirectory.

To copy the artifact into the correct place, you can call mvn -Dimagej.app.directory=/path/to/ImageJ.app/. This will not only copy your artifact, but also all the dependencies. Restart your ImageJ or call Help>Refresh Menus to see your plugin in the menus.

Developing plugins in an IDE is convenient, especially for debugging. To that end, the plugin contains a main method which sets the plugins.dir system property (so that the plugin is added to the Plugins menu), starts ImageJ, loads an image and runs the plugin. See also this page for information how ImageJ makes it easier to debug in IDEs.

Since this project is intended as a starting point for your own developments, it is in the public domain.

How to use this project as a starting point

Either

Then:

  1. Edit the pom.xml file. Every entry should be pretty self-explanatory. In particular, change
    1. the artifactId (NOTE: should contain a '_' character)
    2. the groupId, ideally to a reverse domain name your organization owns
    3. the version (note that you typically want to use a version number ending in -SNAPSHOT to mark it as a work in progress rather than a final version)
    4. the dependencies (read how to specify the correct groupId/artifactId/version triplet here)
    5. the developer information
    6. the scm information
  2. Remove the GaussFiltering.java file and add your own .java files to src/main/java/<package>/ (if you need supporting files -- like icons -- in the resulting .jar file, put them into src/main/resources/)
  3. Replace the contents of README.md with information about your project.

If you cloned the example-imagej-command repository, you probably want to publish the result in your own repository:

  1. Call git status to verify .gitignore lists all the files (or file patterns) that should be ignored
  2. Call git add . and git add -u to stage the current files for commit
  3. Call git commit or git gui to commit the changes
  4. Create a new GitHub repository
  5. git remote set-url origin [email protected]:<username>/<projectname>
  6. git push origin HEAD

Eclipse: To ensure that Maven copies the plugin to your ImageJ folder

  1. Go to Run Configurations...
  2. Choose Maven Build
  3. Add the following parameter:
    • name: imagej.app.directory
    • value: /path/to/ImageJ.app/

This ensures that the final .jar file will also be copied to your ImageJ plugins folder everytime you run the Maven Build

neubias_ts11's People

Contributors

haesleinhuepf avatar

Stargazers

 avatar Jeff Zeyl avatar Umberto Mazzucchelli avatar  avatar  avatar Kota Miura avatar

Watchers

James Cloos avatar Jan Eglinger avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.