Skip to content
blegacPublic

About

A small desktop GUI (CustomTkinter) for organizing Fiji/ImageJ microscopy measurement exports.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

FijExcel

License Release Python

A small desktop GUI (CustomTkinter) for organizing Fiji/ImageJ microscopy measurement exports.

It reads multi-sheet Excel files produced by Fiji/ImageJ, parses experimental parameters out of each sheet's title (e.g. 20X_488_NV_T1.oif.files), and rebuilds a single tidy spreadsheet with one row per measurement and one column per parameter, followed by the measurement values from each sheet.

Before and after: raw Fiji export with one column per image and a spacer column, transformed into a tidy table with one parameter per column

Features

  • Per-user, per-experiment parameter profiles saved as JSON, so you don't have to redefine parameter names every time
  • Automatic title parsing that strips common Fiji/ImageJ file extensions (.oif.files, .oif, .tif, etc.)
  • Background processing thread with a progress bar, so the GUI never freezes on large files
  • Outputs a new <original_name>_ordered.xlsx file alongside the source file

Installation

git clone https://github.com/<your-username>/fijexcel.git
cd fijexcel
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Usage

python fijexcel.py
  1. Select or create a user and experiment in the left sidebar.

  2. Click Select Excel File and choose the Fiji/ImageJ .xlsx/.xls export.

  3. Click Parameters Configuration to define (or reuse) parameter names for the values parsed from the sheet titles.

    Define parameters dialog with one text field per title token (e.g. "mouse1", "s1", "ctx", "dapi", "20X", "19710731"), pre-filled with suggested names

  4. Click Process Excel File. The organized file is saved next to the original as <name>_ordered.xlsx.

Generating a compatible input file in Fiji

FijExcel expects the kind of spreadsheet you get when a Fiji/ImageJ macro loops over every image in a folder, measures each one, and appends the result as a new column in the same sheet on every iteration.

  1. In your loop macro, after each Measure call, save the accumulating Results table with the Read and Write Excel plugin (install it via Help > Update... > Manage update sites, then use it from your macro or the Results table menu) instead of overwriting a CSV each time. Point every save at the same output file/sheet so each image's measurement lands in its own column, one column per loop iteration.

  2. Give each image a name that encodes its parameters, separated by underscores, e.g.:

    mouse1_s1_ctx_dapi_20X_19710731
    

    (subject_slice_region_stain_objective_date) — whatever fields matter for your experiment, in a consistent order. FijExcel splits the title on _ and pads/truncates to however many parameter names you defined, so keep the number of fields consistent across images in the same experiment.

  3. This image name becomes the column title Fiji/the plugin writes to row 1. The Read and Write Excel plugin writes an empty column after every data column when saving iteratively — that's expected, and exactly why FijExcel only reads every other column (0, 2, 4, ...) when parsing titles and values. Don't try to remove these blank columns yourself; the parser relies on them being there to line up titles with data.

  4. Repeat across sheets (e.g. one sheet per measurement type, such as intensity, area) if needed — FijExcel processes every sheet except one named thresholds.

The result is a file structurally like examples/example_dataset.xlsx: image names with embedded parameters across row 1, an empty spacer column between each, and the corresponding measurement (e.g. Mean) below each name.

Requirements

  • Python 3.9+
  • See requirements.txt

Notes

  • Sheets named thresholds are automatically excluded from processing.
  • The parameter-name suggestions shown when defining parameters (e.g. 20X → objective) are configured in PARAMETER_CATEGORIES near the top of fijexcel.py. Edit that table to match the values and categories used in your own imaging setup.
  • Parameter profiles are stored as <user>_parameters.json files next to the script and are gitignored, since they're per-user local data rather than project source.

License

MIT — see LICENSE.

Changelog

See CHANGELOG.md for release history.

About

A small desktop GUI (CustomTkinter) for organizing Fiji/ImageJ microscopy measurement exports.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages