Operators/Tools/Interactive/LabelImageEditor: Difference between revisions
No edit summary |
(→Usage) |
||
Line 43: | Line 43: | ||
<br> | <br> | ||
* Input data:<br>The operator reads the contents of a given input image directory and displays all images one after the other to the user. <br>The user can edit the images, i.e. remove labeled regions, by clicking with the left mouse button somewhere into the region to remove.<br> Clicking the "Next" button at the top of the editor window will save the current image to disk and proceed with the next image in the folder. <br><br> | * Input data:<br>The operator reads the contents of a given input image directory and displays all images one after the other to the user. <br>The user can edit the images, i.e. remove labeled regions, by clicking with the left mouse button somewhere into the region to remove.<br> Clicking the "Next" button at the top of the editor window will save the current image to disk and proceed with the next image in the folder. <br><br> | ||
* Output data:<br>For each input image the operator will save a corresponding output image, either in the same folder or a specific output folder if provided.<br> Output images will share the name of the corresponding input image extended with substring "-edited". | * Output data:<br>For each input image the operator will save a corresponding output image, either in the same folder or a specific output folder if provided.<br> Output images will share the name of the corresponding input image extended with substring "-edited".<br> Note, all images are relabeled automatically before saving to ensure consecutive labels in the resulting edited images. <br> Consecutive labels are a pre-requisite for some other MiToBo tools which can be used in further processing steps, like the [[Applications/FeatureColorMapper|FeatureColorMapper]]. | ||
<br> | <br> |
Revision as of 15:49, 4 February 2020
Label Image Editor
The Label Image Editor is available since release version 1.8.8 of MiToBo.
In MiToBo/MiToBo plugins release 1.8.13.1 it got a rich feature update.
Latest News
The editor got latest updates in MiToBo/MiToBo plugins 1.8.17.
Name of Plugin/Operator
de.unihalle.informatik.MiToBo.tools.interactive.LabelImageEditor
(available since MiToBo version 1.8.8)
Main features
- images provided in an input folder are subsequently displayed to the user
- regions, i.e. connected components, can be removed and joined by simple mouse-clicks
- additional boundaries can be added by drawing free-hand lines
- region labels can be adjusted to enhance visibility
- region re-labeling is supported to guarantee unique labels
- holes within regions can be filled
Usage
The editor is dedicated to the analysis of label images. In a label image each region or connected component, respectively, is assumed to be marked with a unique intensity or color value, i.e. all of its pixels should share this value.
The editor provides various editing functions to remove or join regions within such images.
Note that the editor can also handle label images with one-pixel wide black boundaries between regions.
The editor takes as input a directory from where the images are loaded one after the other.
Once an image is displayed to the user edit operations can be performed. Afterwards the changes are saved to a new image file and the next label image is read from the given input directory.
To run the LabelImageEditor perform the following steps:
- install MiToBo by following the instructions on the Installation page
- run MiToBo and start the operator runner by selecting the menu item MiToBo Runner from Plugins -> MiToBo
- in the selection menu navigate to de.unihalle.informatik.MiToBo.tool.interactive and select the operator LabelImageEditor
This will bring up the operator window of the LabelImageEditor (see figure on the right, top) where the basic configuration parameters can be added. Clicking the "Run" button will open the editor window with the first image loaded (figure on the right, bottom).
- Input data:
The operator reads the contents of a given input image directory and displays all images one after the other to the user.
The user can edit the images, i.e. remove labeled regions, by clicking with the left mouse button somewhere into the region to remove.
Clicking the "Next" button at the top of the editor window will save the current image to disk and proceed with the next image in the folder. - Output data:
For each input image the operator will save a corresponding output image, either in the same folder or a specific output folder if provided.
Output images will share the name of the corresponding input image extended with substring "-edited".
Note, all images are relabeled automatically before saving to ensure consecutive labels in the resulting edited images.
Consecutive labels are a pre-requisite for some other MiToBo tools which can be used in further processing steps, like the FeatureColorMapper.
- Parameters:
Name | Description |
Input Directory | directory from where the images to process will be loaded |
File Filter | Optional string to filter image files to be processed. If the string is empty all files are processed. If a non-empty string is provided, files with names not containing the pattern will be skipped. For example, if the string ".tif" is provided, only images ending with ".tif", i.e. in TIFF format, will be considered. The string "cell" would select only images containing the word "cell" somewhere in their names. Note that as string any valid Java regular expression is admissible. See for example this website for more details on regular expressions. |
Output directory | optional; edited result label images will be saved to this directory; if not provided the result images will be stored in the input folder |
The following table lists all available operations available in the editor window:
Operation | How to do it |
remove a region | click with left mouse button somewhere into the region to be removed; the region will then be removed by setting all its pixels to a value of zero |
join two regions | press 'Shift' and left-click into the first region to remember its label, then release 'Shift' and left-click into the second region; the label of the first region will be transferred to the second region; black pixels between both parts can be removed afterwards using the "Fix borders" button |
draw a new boundary | keep left mouse button pressed and drag the mouse; this will add a one-pixel wide free-hand line to the label image |
The buttons in the editor window have the following functions:
Button | Function | Keyboard Shortcut |
Next | save current changes and jump to next image | Alt + n |
Skip | cancel current image, don't save anything and jump to next image | Alt + s |
Contrast | adjust labels to optimize visibility, i.e., shift labels into upper third of gray-scale range with maximal distances between them | Alt + c |
Relabel | relabel the image, i.e., make sure that every region gets a unique label | Alt + r |
Fix Borders | remove all background pixels with more than one foreground label in their 3x3 neighborhood | Alt + b |
Fill Holes | fill background regions enclosed by a single region with the region label | Alt + h |
Undo | undo the last action; IMPORTANT: only the most recent action can be undone! | Alt + u |
Quit | save current changes and quit the editor window | Alt + q |
Hint: The Undo function has currently only a history of length one. If you accidentally deleted too many regions or want to undo more than one action, either run the editor once again on the complete directory or copy the corresponding image to a separate folder and run the editor on that folder. Results of a former run will be overwritten without further inquiry.
Updates
January 2019
- The editor got a comprehensive update in MiToBo 1.8.13.1 and MiToBo-plugins 1.8.13.1, respectively. There is now much more editing functionality available, e.g., filling holes or drawing of free-hand lines.
March 2018
- The LabelImageEditor has been released in MiToBo 1.8.8 and MiToBo-plugins 1.8.8, respectively.