GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 13hannes11/focus_annotator: This is a tool to annotate the focus plane of z-stacked images.

BranchesTags
Open more actions menu

Latest commit

 

History

74 Commits
74 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
create_windows_installer.sh
create_windows_installer.sh
 
 
docker-compose.windows.yml
docker-compose.windows.yml
 
 
docker-compose.yml
docker-compose.yml
 
 
setup.iss
setup.iss
 
 

Repository files navigation

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

You can either download the latest release here or compile from source.

Compilation Instructions

Docker

The tool can be compiled with docker-compose:

  • Linux Version docker-compose up (compiles to AppImage)
  • Windows Version: docker-compose -f docker-compose.windows.yml up (the resulting file is packaged as package.zip, dependencies included)

Native

The prerequisits can be installed as described in the gtk4-rs book:

  • Linux
  • Windows (untested)
  • Mac OS (untested)

After the prerequisits are installed you can run/build the tool as is usual for rust:

cargo run

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": "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                "neighbours": [
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg",
                    "img/30_753da05d-cd1e-45c5-8593-003323e0bb69_I00243_X013_Y003_Z4648.jpg"
                ]
            }
        ],
        "best_index": 0
    }
    {
        "images": [
            {
                "image_path": "img/31/I03987/I03987_X008_Y026_Z5498_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "img/31/I03987/I03987_X008_Y026_Z5498_0_1125.jpg",
                    null,
                    "img/31/I03987/I03987_X008_Y026_Z5498_75_1125.jpg",
                    "img/31/I03987/I03987_X008_Y026_Z5498_75_1200.jpg",
                    null
                ]
            },
            {
                "image_path": "img/31/I03988/I03988_X008_Y026_Z5566_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "img/31/I03988/I03988_X008_Y026_Z5566_0_1125.jpg",
                    null,
                    "img/31/I03988/I03988_X008_Y026_Z5566_75_1125.jpg",
                    "img/31/I03988/I03988_X008_Y026_Z5566_75_1200.jpg",
                    null
                ]
            },
            {
                "image_path": "img/31/I03989/I03989_X008_Y026_Z5703_0_1200.jpg",
                "neighbours": [
                    null,
                    null,
                    null,
                    "img/31/I03989/I03989_X008_Y026_Z5703_0_1125.jpg",
                    null,
                    "img/31/I03989/I03989_X008_Y026_Z5703_75_1125.jpg",
                    "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) which is relative to the position of the json file, 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.

About

This is a tool to annotate the focus plane of z-stacked images.

Topics

adwaitadata-annotationfocus-stackinggtk4gtk4-rslibadwaitamicroscopyrustwholeslide-imagingz-stack

Resources

Readme
MIT license
Activity

Stars

27 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.