Microscopy Image Browser  1.233
All Classes Files Functions Variables Pages
ib_addText2Img.m File Reference

Add text label to the image. More...

Functions

function img = ib_addText2Img (img, textArray, positionList, textTable, options)
 Add text label to the image. More...
 

Detailed Description

Add text label to the image.

Function Documentation

function img = ib_addText2Img (   img,
  textArray,
  positionList,
  textTable,
  options 
)

Add text label to the image.

Parameters
img- > image, 2D
textArray-> a cell array with text, [textArray{1}=label1; textArray{2}=label2;]
positionList-> position of a label [pointNo; x, y]
textTable-> a bitmap two color image with a table of letters (DejaVuSansMono.png)
options-> a 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 DejaVu Sans 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
Return values
img-> image 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) = ib_addText2Img(selection(:,:,5), textArray, positionList, handles.dejavufont, options); // add 2 labels to the selection layer

Referenced by imageData.getRGBimage(), ibaboutDlg>ib_aboutDlg_OpeningFcn(), and imbrowser>im_browser_OpeningFcn().

Here is the caller graph for this function: