Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
mibAddText2Img.m File Reference

Add text label to the image, a new function introduced in MIB 2.22. Requires insertText and insertMarker functions from the Computer Vision System Toolbox. When these functions are not available mibAddText2Img is using an old function. More...

Functions

function img = mibAddText2Img (img, textArray, positionList, options)
 Add text label to the image, a new function introduced in MIB 2.22. Requires insertText and insertMarker functions from the Computer Vision System Toolbox. When these functions are not available mibAddText2Img is using an old function.
 

Detailed Description

Add text label to the image, a new function introduced in MIB 2.22. Requires insertText and insertMarker functions from the Computer Vision System Toolbox. When these functions are not available mibAddText2Img is using an old function.

Function Documentation

◆ mibAddText2Img()

function img = mibAddText2Img ( img,
textArray,
positionList,
options )

Add text label to the image, a new function introduced in MIB 2.22. Requires insertText and insertMarker functions from the Computer Vision System Toolbox. When these functions are not available mibAddText2Img is using an old function.

Note
: if you need to print special characters generate them using
char(dec_index) command. For example to replace all \mu with a proper u character use char(956) command
textArray = strrep(textArray, 'mu', char(956)); see more codes: https://unicode-table.com/en/
Parameters
imgimage, 2D
textArraya cell array with text, [textArray{1}='label1'; textArray{2}='label2';]
positionListposition of a label [pointNo; x, y]
optionsa structure with optional additional parameters .color [optional, default color GREY] a number or a rgb-vector with a color for the text, for example: [1 0 0] - for red; or 0.5 - for grey .fontSize [optional, default font size=2] a number with a font size from 1 to 7, that corresponds to pt8, 10 ... 20 of Ubuntu Mono font. .markerText [an optional string, default both] when both show a label next to the position marker, when marker - show only the marker without the label, when text - show only text without marker .AnchorPoint text box reference point, 'LeftTop' (default) | 'LeftCenter' | 'LeftBottom' | 'CenterTop' | 'Center' | 'CenterBottom' | 'RightTop' | 'RightCenter' | 'RightBottom'
Return values
imgimage 2D
Required fields of options:

Examples:

textArray{1}='label1';
textArray{2}='label2';
positionList(1,:) = [50, 75];
positionList(2,:) = [150, 175];
options.color = [1 0 0];
options.fontSize = 3;
selection(:,:,5) = mibAddText2Img(selection(:,:,5), textArray, positionList, options); // add 2 labels to the selection layer
function img = mibAddText2Img(img, textArray, positionList, options)
Add text label to the image, a new function introduced in MIB 2.22. Requires insertText and insertMar...
Definition mibAddText2Img.m:17

References mibAddText2Img_Legacy().

Referenced by mibMeasure.DistanceFun(), mibMeasure.DistancePolyFun(), mibModel.getRGBimage(), mibAboutController.mibAboutController(), and mibController.mibController().

Here is the call graph for this function:
Here is the caller graph for this function: