Fiji / ImageJ macros for automated batch processing of Olympus OIR microscopy files. Handles channel splitting, Z-stack projection, and composite image generation across nested directory structures with no manual interaction.
.
├── unified fiji.ijm # Original macro (with upscaling)
├── unified fiji_no_scale.ijm # Revised macro (native resolution, quality-fixed)
├── README.md
├── input_data/ # Raw .oir files (user-provided)
└── output_data/ # Auto-generated outputs
├── Individual_Channels/
└── Composite_Images/
The original processing macro. Opens each .oir file, detects whether it is a Z-stack or channel-only image, splits channels, generates a composite, and saves TIFFs. Applies a 10× upscale before export and uses a hardcoded inch-based scale.
Revised version with the following changes over the original:
- No upscaling — exports at native camera resolution; removes the 10× Bilinear scale that caused pixelation
- Contrast normalization — applies
Enhance Contrastper channel before 16→8-bit RGB conversion to preserve dynamic range - LUT-preserving channel export — duplicates each channel individually from the composite hyperstack so fluorescence colors are retained in saved TIFFs
- Correct composite rendering — uses
Flatteninstead ofStack to RGB, which renders the composite exactly as displayed including LUT assignments - Calibration preserved — removes the hardcoded
Set Scaleoverride; Bio-Formats reads the correct µm/pixel calibration from OIR metadata automatically
Both macros mirror the input subfolder structure in the output directories and support arbitrarily nested input folders.
- Fiji (ImageJ ≥ 1.53 recommended)
- Bio-Formats plugin — included in standard Fiji; handles Olympus OIR import
- Launch Fiji
- Go to
Plugins → Macros → Edit…and open the.ijmfile - Click Run and choose input/output directories when prompted
- Monitor progress in the Log window
Each run produces:
Individual_Channels/— one TIFF per fluorescence channel per file, with LUT color appliedComposite_Images/— merged composite TIFF with the transmission/brightfield channel excluded
Output folder structure mirrors the input directory tree.