Labkit is a plugin for:
- automatic image segmentation
- labeling regions of an image
The automatic image segmentation functionality is comparable to Trainable Weka Segmenation, but it’s better suited for large 3d images. And it has a nice BigDataViewer-based editor.
To start Labkit in ImageJ, first open the image you want to work with, and then select Plugins › Segmentation › Labkit from the main menu.
Follow these steps to segment an image:
- Open an image in ImageJ.
- Start Labkit by selecting Plugins › Segmentation › Labkit from the menu.
- Labkit should start and display the image. If it shows a black window instead of the image: Click S and adjust the contrast.
- Select “foreground” (In the side bar of Labkit). Select the pencil tool (top bar of Labkit) and draw on the image.
- Select “background” and the pencil tool, and mark some other region of the image as background.
- In the side bar of Labkit, under the heading “Segmentation” you will find an entry “Classifier #1”. And next to it there is a play button (black triangle). Click it, to train the Classifier. After a moment you will see the automatic segmentation of your image.
- From Labkit’s main menu select Segmentation › Show Segmentation Result in ImageJ, to export your segmentation into ImageJ.
Labkit is based on BigDataViewer. Navigation the image works as in BigDataViewer, and many shortcuts work too. Click here for a description of the shortcuts.
- ⌃ Ctrl + ⇧ Shift + Mouse Wheel to zoom in and out
- Right Drag to move the image
- Left Drag to rotate a 3d image
- Mouse Wheel to scroll through the z-slices of a 3d image
Tips & Tricks
- If there’s a black window, where the image should be? You might need to change the contrast settings: Click on the image, and then press S on the keyboard. A dialog shows up. Use it to adjust the contrast.
- There can be more than two labels, just click on the “Add label” button…
- Labels can be renamed, by double clicking on them.
- To change the label color, just click on the colored rectangle left of the labels name.
- D + Mouse Wheel to change the size of the brush tool.
Drawing Tool Shortcuts
- D + Left Click to draw with the pencil tool.
- E + Left Click to erase with the pencil tool.
- F + Left Click to use the flood fill tool.
- R + Left Click to remove a connected component.
- N - switch to next label
Open & Save - Import & Export
- Things you can save, open, import or export:
- Labeling - As
- Bitmap - (One layer of the labeling) As
- Classifier - As
*.classifier, only Labkit is able to work with them.
- Segmentation result - As
*.tif, or show to ImageJ
- Segmentation’s probability Map - As
*.tif, or show in ImageJ
- Labeling - As
- The word “labeling” is used to refer to the colorfully displayed areas overlayed on top of the image.
- Labkit’s file format for labelings is
*.labeling. It works great for very large files with very few labels. (This file format is likely to be improved and changed in the future.)
- The labeling can be saved and opened as
*.tifas well. (This is a good option for not-too-big images. And can be used by any other tool.)