How imcf/python-imcflibs works
Main Components
a. Core Library:
• Base package “imcflibs” which includes utility modules (e.g., iotools.py, log.py, pathtools.py, strtools.py).
• That these functions are generic and provide common utility support.
b. ImageJ/Central Imaging Module:
• Sub-package “imcflibs/imagej” contains specialized modules for interfacing with ImageJ/Fiji (e.g., bioformats.py, shading.py, stitching.py, projections.py, etc.).
c. Testing Infrastructure:
• “tests” directory which mirrors the primary modules. This shows unit tests for both generic utilities and the specialized ImageJ functionality.
d. Build and Deployment System:
• Maven build configuration (pom.xml), GitHub workflows in “.github/workflows”, and shell scripts in “scripts” (like build_and_deploy.sh).
• This ties into CI/CD and publication to the SciJava Maven repository.
e. External Interfaces:
• External dependencies and integrations, specifically the connection with Fiji/ImageJ2, update sites, and Maven-based release mechanism.
Relationships and Interactions
• That tests are performed against both the generic and ImageJ parts of the library to validate functionality.
• Link build scripts and Maven configurations to the source code – emphasizing that any changes in the core or ImageJ modules trigger CI/CD workflows before deployment.
• A connection (perhaps as a side note) between the library and external systems: namely, how end users integrate this library into their ImageJ setup (via the IMCF Uni Basel update site).
Architectural Patterns and Design Principles
• Modular design: The separation between general utility functions and image processing-specific wrappers.
• Clear separation of concerns: “src/imcflibs” for functionality and “tests” for verification.
• Integration of CI/CD: Continuous integration (via GitHub workflows) and Maven-based release pipeline.
• Interoperability design: Although it’s written in Python, it is built around the ImageJ ecosystem which may use Jython, emphasizing a hybrid approach in terms of language and environment compatibility.