Tips/Labeling: Difference between revisions
No edit summary |
|||
Line 16: | Line 16: | ||
Note that some operators also accept binary masks. Refer to the documentation of the specific operator for details. | Note that some operators also accept binary masks. Refer to the documentation of the specific operator for details. | ||
Contours can also be represented by line drawings, i.e., images with white (or black) background where the contours are marked as 1-pixel wide lines in black (or white).<br> Such images can easily be converted into a label image using the MiToBo | Contours can also be represented by line drawings, i.e., images with white (or black) background where the contours are marked as 1-pixel wide lines in black (or white).<br> Such images can easily be converted into a label image using the <i>MiToBo Runner</i> to be found in ImageJ/Fiji via | ||
Plugins -> MiToBo -> MiToBo Runner | Plugins -> MiToBo -> MiToBo Runner | ||
Line 24: | Line 24: | ||
de - unihalle - informatik - MiToBo - segmentation - regions - labeling | de - unihalle - informatik - MiToBo - segmentation - regions - labeling | ||
the operator | the operator <i>LabelComponentsSequential</i>. To use the operator make sure that your contours have black color on a white background. <br> | ||
If this is not the case, invert the image using the ImageJ/Fiji function | If this is not the case, invert the image using the ImageJ/Fiji function | ||
Edit -> Invert | Edit -> Invert | ||
The outcome of the operator will be a label image which is accepted as input for most MiToBo operators. | The outcome of the operator will be a label image which is accepted as input for most MiToBo operators requiring contour or region information. | ||
== Manual labeling in ImageJ/Fiji == | == Manual labeling in ImageJ/Fiji == |
Revision as of 12:21, 28 August 2018
Manual annotation and labeling of cell contours
Some MiToBo operators like PaCeQuant, ActinAnalyzer2D or CytoskeletonAnalyzer2D analyze individual cells in microscope images.
Thus, they require information about the cell regions and cell boundaries, respectively, of individual cells.
PaCeQuant includes algorithms for automatic cell segmentation, and operators like the CellBoundaryExtractor2D might be used for extracting cell boundaries.
However, if automatic segmentation does not work properly and manual post-processing is not an option, cell segmentation can also be performed completely manually.
On this page you will find information about manually post-processing segmentation results as well as suggestions how to best perform manual segmentation.
Formats of cell contour data in MiToBo
Most operators in MiToBo accept cell contour information in one of the following formats:
- label image: an image where the background is black and each cell (or more general: foreground object) is marked with a unique gray value
- ImageJ ROIs: contour/region data in ImageJ ROI format
Note that some operators also accept binary masks. Refer to the documentation of the specific operator for details.
Contours can also be represented by line drawings, i.e., images with white (or black) background where the contours are marked as 1-pixel wide lines in black (or white).
Such images can easily be converted into a label image using the MiToBo Runner to be found in ImageJ/Fiji via
Plugins -> MiToBo -> MiToBo Runner
Then select in the package
de - unihalle - informatik - MiToBo - segmentation - regions - labeling
the operator LabelComponentsSequential. To use the operator make sure that your contours have black color on a white background.
If this is not the case, invert the image using the ImageJ/Fiji function
Edit -> Invert
The outcome of the operator will be a label image which is accepted as input for most MiToBo operators requiring contour or region information.
Manual labeling in ImageJ/Fiji
To manually label the cells in an image in ImageJ/Fiji you can proceed as follows:
Use the freehand tool to surround a cell in the image.
When done, press "t" to add the contour to the ROI manager.
Repeat the same for all other cells in the image.
If ImageJ ROIs are sufficient for your task, simply save the set of contours to file by selecting from the ROI manager
"More >>" -> "Save..."
and save the ROIs to a file of your choice.
For generating a label image, first set the ImageJ foreground color to black via
Edit -> Options -> Color...
Then select the complete image via
Edit -> Selection -> Select All
Afterwards select
Edit -> Fill
This will fill your complete image in black.
Now change the foreground color to white and select a cell region from the ROI manager. Its contour is shown in the image. Right-click inside the contour and select "Fill". This will make the cell region white.
Proceed with all cell regions from the ROI manager that way.
You should now have a black-white mask image for your cell image.
To transform this mask into a label image navigate in ImageJ/Fiji to
Plugins -> MiToBo -> MiToBo Runner
Then select from the tree of available operators
de - unihalle - informatik - MiToBo - segmentation - regions - labeling
the operator
LabelComponentsSequential
by double-click. This will bring-up a window where you can select your
binary mask image as input image. Then press the "Run" button.
The result will be a label image which you can save to disk, e.g., in TIF format.