/image_processing_with_imagej

This repository was created for projects related to Image Processing with ImageJ. Specifically, below are descriptions of how to create, run, and delete plugins.

Primary LanguageJava

This repository was created for projects related to Image Processing with ImageJ. Specifically, below are descriptions of how to create, run, and delete plugins.

Tools:

- Eclipse IDE

  • version: 2022-09 (4.25.0)
  • build id: 20220908-1902

- OS (Linux): Pop!_OS 20.04 LTS 64-bit

Starting

1 - Use this template and create a new repository. Then clone the repository inside eclipse-workspace.

2 - In Eclipse, click File > Import. The following window will open. Under General, select Projects from Folder or Archive. Click Next.

3 - Click Directory and find the folder containing IJ, Plugins_ and the tools.jar file.

4 - Select IJ.

5 - On this screen, click Finish. Repeat the process for the Plugins_ folder.

6 - You will most likely get an error regarding the IJ folder. We will need to config the build path.

image

7 - From the options on the left, select Java Build Path. Select the Libraries tab and then select tools.jar and remove it.

image

8 - Click Add External JARs and select the tools.jar file which is in the same folder as IJ and Plugins_. Then click Apply and Apply and Close.

image

Create a plugin

1 - In the default package folder, create a new class. Remember that a plugin's class name must end with an underscore (example: myClass_).

2 - Implement the interface and write your code. Here, when running the plugin, it will show a log with the message "Inside Example_".

3 - In the debug options, click the down arrow and select debug_config. This will launch the ImageJ application.

4 - In the application, in Plugins options, it is possible to see the new plugin. When clicking on it, the code that was placed inside the run method will be executed.

5 - Below, the plugin running.

Delete a plugin

Before starting, make sure ImageJ is not running.

1 - In the Package Explorer, click on a file and update the repository by pressing F5. This is needed to show possible files that were created but are not being shown.

2 - If you delete only the plugin (inside the default package folder), when running ImageJ it will still appear in the list and can be run normally.

3 - To actually delete, you need to delete the following files:

  • IJ/plugins/Plugins_.jar
  • Plugins_/Plugins_.jar

4 - So, again, in the debug options, click the down arrow and select debug_config. This will build a new .jar with the remaining plugins.

Other Materials

https://www.youtube.com/watch?v=toe19WETRt4&ab_channel=DaviCarvalho