2022-02-09 13:39:57 +01:00
2022-02-07 11:40:31 +01:00
2021-12-19 20:19:59 +01:00
2022-02-04 15:40:24 +01:00
2022-02-04 15:40:24 +01:00
2022-02-07 10:45:56 +01:00

Focus Annotator

Focus Annotator is a tool for annotation the focal plane of a part of an image. It is a tool I built in rust as part of my master's thesis to make image focus annotations for z-stack images quicker.

image

Installation

Currently the application can only be optained by compiling from source

Compilation Instructions

To compile and run this tool gtk and libadwaita are needed. More detailed instructions are planned for the future.

Usage

When opening the program open a .json file that describes where to find the images. The file should look as follows.

[
    {
        "images": [
            {
                "image_path": "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                "neighbours": [
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "~/Documents/thesis/img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg"
                ]
            }
        ],
        "best_index": 0
    }
    {
        "images": [
            {
                "image_path": "~/Documents/thesis/img/31/I03987/I03987_X008_Y026_Z5498_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "~/Documents/thesis/img/31/I03987/I03987_X008_Y026_Z5498_0_1125.jpg",
                    null,
                    "~/Documents/thesis/img/31/I03987/I03987_X008_Y026_Z5498_75_1125.jpg",
                    "~/Documents/thesis/img/31/I03987/I03987_X008_Y026_Z5498_75_1200.jpg",
                    null
                ]
            },
            {
                "image_path": "~/Documents/thesis/img/31/I03988/I03988_X008_Y026_Z5566_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "~/Documents/thesis/img/31/I03988/I03988_X008_Y026_Z5566_0_1125.jpg",
                    null,
                    "~/Documents/thesis/img/31/I03988/I03988_X008_Y026_Z5566_75_1125.jpg",
                    "~/Documents/thesis/img/31/I03988/I03988_X008_Y026_Z5566_75_1200.jpg",
                    null
                ]
            },
            {
                "image_path": "~/Documents/thesis/img/31/I03989/I03989_X008_Y026_Z5703_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "~/Documents/thesis/img/31/I03989/I03989_X008_Y026_Z5703_0_1125.jpg",
                    null,
                    "~/Documents/thesis/img/31/I03989/I03989_X008_Y026_Z5703_75_1125.jpg",
                    "~/Documents/thesis/img/31/I03989/I03989_X008_Y026_Z5703_75_1200.jpg",
                    null
                ],
            }
        ],
        "best_index": null
    }
]

The json file contains a list of unamed objets. Each object corresponds to one focus stack. Best index is set to null for non annotated images and is a number corresponding to the image in focus once annotated. The array image present in each focus stack contains objects tat represents the individual images.

Each individual image has an image_path (mandatory), and 8 (!) neighbours (which are allowed to be set to null). Neighbours are represented indexed the following way:

0 1 2
3 - 4
5 6 7

You are allowed to store additional data in focus stack objects (and image objects) and this should be preserved when using the tool, however, make sure to back up the metadata file before using the tool.

Keyboard shortcuts

The tool supports keyboard shortcuts:

  • w - move up in the focus stack
  • s - move down in the focus stack
  • b - back - go back one image
  • n - next - skip image
  • m - mark - mark current image in the z-stack as in focus and go to next image

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Description
This is a tool to annotate the focus plane of z-stacked images.
Readme 116 KiB
Languages
Rust 93.1%
Inno Setup 6%
Shell 0.9%