flfm-ij-plugin
A Java ImageJ 1.x Plugin Wrapper for the FLFM Project (https://github.com/ssec-jhu/flfm)
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
✓Institutional organization owner
Organization ssec-jhu has institutional domain (ai.jhu.edu) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Repository
A Java ImageJ 1.x Plugin Wrapper for the FLFM Project (https://github.com/ssec-jhu/flfm)
Basic Info
- Host: GitHub
- Owner: ssec-jhu
- License: bsd-3-clause
- Language: Java
- Default Branch: main
- Size: 423 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 9
- Releases: 2
Metadata Files
README.md
SSEC-JHU flfmijplugin

This is an ImageJ 1.x plugin wrapper for the SSEC FLFM project. This project uses The Deep Java Library(djl) to load the pytorch models exported from the FLFM project.
Quickstart Guide
Get the latest jar file from <release location>. Choose the appropriate
release according to your OS. It should be one of:
* flfm_plugin.windows.jar
* flfm_plugin.linux.jar
* flfm_plugin.macos.jar (not currently available)
Place the jar file into the plugins folder for you ImageJ installation.
Open ImageJ and select Plugins from the top menu, then select FLFM Plugin.
[!TIP] ISSUES DETECTING GPU? Sometimes there can be an issue with the detection of the GPU when running the plugin. There a couple things that you can do to fix this issue: 1. Start ImageJ with the plugin jar on the classpath: - Open a terminal in the directory of the ImageJ installation - Linux: -
./ImageJ -cp plugins/flfm_plugin.linux.jar- Windows: -ImageJ.exe -cp plugins\flfm_plugin.windows.jar2. Add the DJL cache to thePATHvariable. The DJL library will download\extract the required libraries to run the FLFM pytorch code to the DJL cache location. This can be set manually by following the DJL documentation The default location is something like: - Linux: -~/.djl.ai/pytorch/2.5.2-cu124-linux-x86_64/- Windows: -C:\Users\<username>\.djl.ai\pytorch\2.5.1-cu124-win-x86_64\
Installation, Build, & Run instructions
Build:
To build the project requires two steps:
1. Use the FLFM python package to export model files for all desired iterations
(current [1-15]).
2. Build the Java plugin using Maven with the model files copied into the
src/main/resources/models directory.
For convenience, the make file will do all of this for you, but you need to have
the following prerequisites installed:
* conda
* maven
#### Docker: (TODO)
#### Locally:
1. Clone the repository:
bash
git clone https://github.com/ssec-jhu/flfm-ij-plugin.git
2. Change into the repository directory:
bash
cd flfm-ij-plugin
3. Run the make command:
bash
make linux
or
bash
make windows
If you need to rebuild the project it is recommended to clean the project first:
bash
make clean
Run
This plugin can be run as a standalone jar and as an ImageJ 1.x plugin with the latter being the general use case and the former being more helpful for debugging and testing, but functional nonetheless.
ImageJ 1.x Plugin
To run this in ImageJ 1.x, copy the .jar for your OS
flfm_plugin.<linux|windows>.jar into the plugins folder in your ImageJ
installation, then start ImageJ.
Standalone
Using Java 8, the jar can be run directly using:
bash
java -jar flfm_plugin.<linux|windows>.jar
Where <linux|window> should be replaced with the OS you're running it on.
Usage:
The standalone jar opens directly to the FLFM PLugin UI, if it's being run as an ImageJ plugin there is a single step to get to the plugin.
Open ImageJ and from the Plugins menu select FLFM Plugin:

This will open the FLFM Plugin Menu:

To use the plugin populate the fields with the desired values and click Calculate

NOTE on image selection
When you try to select an image, the Plugin will first try to get an image already opened in ImageJ with the following menu popping up:

If the plugin doesn't detect any open ImageJ images or if you close the menu, the plugin will open a file selector menu to select an image from disk.
Testing
Linting:
Facilitates in testing typos, syntax, style, and other simple code analysis tests.
* cd into repo dir.
* Use Spotless to check code formatting:
```mvn spotless:check --file flfm-ij/pom.xml```
Use Checkstyle for linting the code:
mvn checkstyle:check --file flfm-ij/pom.xml
Security Checks:
Facilitates in checking for security concerns using SpotBugs.
* cd into repo dir.
* mvn -B spotbugs:check --file flfm-ij/pom.xml
Unit Tests:
Facilitates in testing core package functionality at a modular level.
* cd into repo dir.
* Run all available tests:
```mvn clean test --file flfm-ij/pom.xml```
Regression tests:
Facilitates in testing whether core data results differ during development. * WIP
Smoke Tests:
Facilitates in testing at the application and infrastructure level. * WIP
Build Docs:
Facilitates in building, testing & viewing the docs.
* cd into repo dir.
* pip install -r requirements/docs.txt
* cd docs
* make clean
* make html
* To view the docs in your default browser run open docs/_build/html/index.html.
Owner
- Name: Scientific Software Engineering Center at JHU
- Login: ssec-jhu
- Kind: organization
- Email: ssec@jhu.edu
- Location: United States of America
- Website: https://ai.jhu.edu/ssec/
- Repositories: 1
- Profile: https://github.com/ssec-jhu
Accelerating Software Development for Science Research
GitHub Events
Total
- Create event: 8
- Release event: 2
- Issues event: 10
- Delete event: 2
- Member event: 1
- Issue comment event: 13
- Push event: 26
- Pull request event: 12
- Pull request review event: 20
- Pull request review comment event: 20
Last Year
- Create event: 8
- Release event: 2
- Issues event: 10
- Delete event: 2
- Member event: 1
- Issue comment event: 13
- Push event: 26
- Pull request event: 12
- Pull request review event: 20
- Pull request review comment event: 20
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v4.4.3 composite
- codecov/codecov-action v3 composite
- docker/build-push-action f2a1d5e99d037542a71f64918e516c093c6f3fc4 composite
- docker/login-action 65b78e6e13532edd9afa3aa52ac7964289d1a9c1 composite
- docker/metadata-action 9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 composite
- actions/checkout v4 composite
- actions/download-artifact v4.1.7 composite
- actions/setup-python v4 composite
- actions/upload-artifact v4.4.3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- python 3.11-slim build
- fastapi [all]
- build ==1.2.2.post1
- setuptools ==80.9.0
- setuptools_scm ==8.3.1
- tox ==4.26.0 development
- nbsphinx ==0.9.7
- sphinx ==6.2.1
- sphinx-automodapi ==0.19.0
- sphinx_book_theme ==1.1.4
- sphinx_rtd_theme ==3.0.2
- fastapi ==0.115.12
- uvicorn ==0.34.3
- bandit ==1.8.3 test
- pytest ==8.3.5 test
- pytest-cov ==6.1.1 test
- ruff ==0.11.12 test