How mdcurtis/micromanager-upstream works
Project type and purpose
• This is Micro-Manager, an open-source, cross-platform microscopy control system. It consists of:
• A native C++ core library (MMCore) that manages device communication and acquisition logic
• A device abstraction layer (MMDevice) and many DeviceAdapter modules (DLLs/.so) that drive microscope hardware
• A Java Swing desktop application (MMStudio) that provides the user interface and a plugin framework
• Language bindings (SWIG-generated Java & Python wrappers) and scripting support (Beanshell, Clojure)
• A rich plugin ecosystem (pure-Java modules under plugins/) for specialized acquisition or analysis tasks
A. MMCore (C++ core)
– Manages overall system state, acquisition sequences, logging, configuration
– Exposes a plugin/adapter API for hardware modules
B. MMDevice (C++ module interface)
– Defines abstract base classes and threading support for any device type
– Loads individual DeviceAdapter shared libraries at runtime
C. DeviceAdapters (C++ shared libraries)
– One adapter per hardware device: cameras, stages, shutters, lasers, etc.
– Implements MMDevice interfaces to translate generic device calls into hardware-specific driver calls or DLL calls
D. Java Wrappers
– MMCoreJ_wrap: SWIG-generated JNI glue for Java (MMStudio)
– MMCorePy_wrap: SWIG-generated wrapper for Python scripts
E. MMStudio (Java Swing UI)
– Front-end application, loads MMCore via JNI, offers configuration panels, live view, acquisition controls, plugin manager
– Hosts pure-Java plugins (src in plugins/… package hierarchy) that implement the MMPlugin API
F. Scripting engines & CLI
– Beanshell scripts (scripts/*.bsh) executed by MMStudio’s embedded interpreter
– Clojure/Ant-based modules for specialized tasks
G. External interfaces
– Python libraries (MMCorePy) for programmatic control
– Command-line batch utilities (Test_Programs, systemtest, etc.)
Relationships and data flows
• MMStudio (Java UI) ←→ MMCore (JNI calls)
• MMCore loads MMDevice modules (dynamic shared libraries) via PluginManager
• MMDevice base classes dispatch calls to concrete DeviceAdapters
• DeviceAdapters ↔ hardware drivers (OS-level DLLs/USB/serial)
• MMCore emits events (image frames, device status) back up to Java or Python via callback mechanisms
• User scripts (Beanshell, Python) call MMCore or MMStudio API to automate acquisitions
Important architectural patterns
• Plugin architecture: decoupled hardware layer (DeviceAdapters) from core logic
• Adapter pattern: DeviceAdapters implement uniform MMDevice interface to support many hardware types
• Layered pattern: UI layer (Java) atop core library (C++), with language wrappers mediating
• Event-driven design: acquisition events propagate from core to UI/plugins
Technologies & frameworks
• C++ (MMCore, MMDevice, DeviceAdapters)
• SWIG + JNI for Java (MMCoreJ_wrap)
• SWIG + Python C/API for Python bindings (MMCorePy_wrap)
• Java Swing for UI, Ant/Maven/Clojure for builds and scripting
• Make/autotools for native C++ modules, Visual Studio project files for Windows builds