mirror of
https://github.com/13hannes11/focus_annotator.git
synced 2024-09-03 23:21:01 +02:00
113 lines
4.4 KiB
Markdown
113 lines
4.4 KiB
Markdown
# 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.
|
|
|
|

|
|
|
|
|
|
|
|
## 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.
|
|
|
|
```json
|
|
[
|
|
{
|
|
"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.
|