Setup ImageJ Plugin Development in NetBeans

Based on
here

1. Download Netbeans and ImageJ Source

2. Extract ImageJ Sources

3. In Netbeans, ‘File->New Project..’

4. Select ‘Java Free-Form Project’

5. Select root Directory which has build.xml

6. Build and Run Actions : Just ‘Next’

7. Add ‘ij’ and ‘plugins’ to Source Package Folders and ‘Finish’

8. Delete, or comment, line 12 () in source/build.xml
9. Build IJ (It will generate IJ.jar)
10. ImageJ->Properties

11. Java Sources Classpath -> Source Package Folder (ij) -> Add JAR -> Select ij.jar

12. Same thing in plugin

13. Right click on the plugins folder and go to New>Java Class…
14. Write or paste your plugin into the Java Editor window.

15. Go to Build>Compile “(The name of your plugin)”
16. Click “Generate”
17. In the ide-file-targets.xml file in nbproject directory, change “${build.classes.dir}” to “plugins” in line 9

18. Delete line 8 in the ide-file-targets.xml file
19. Select your plugin from the ImageJ Project tree
20. Go to Build>Compile “(The name of your plugin)”
21. Go to Run>Debug Main Project (ImageJ will run. The plugin you created will be in the plugins menu)

* Plugin Class name should be ended as ‘_’ (underscore) to appear in ‘plugin’ menu of ImageJ…

3 thoughts on “Setup ImageJ Plugin Development in NetBeans

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s